# fleets/actions
Documentation: 0.7.0 (source: v0.7.0).

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

## Interfaces

<a id="fleetdeploymentprerequisite"></a>

### FleetDeploymentPrerequisite

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:114](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L114)

A requirement the deployment needs that the Character or StarbasePlayer
does not meet today. `stage` indexes `stages`.

#### Example

```ts
declare const prerequisite: FleetDeploymentPrerequisite;
console.log(prerequisite.kind, prerequisite.message);
```

#### Properties

<a id="kind"></a>

##### kind

```ts
readonly kind: "research" | "components" | "fleet-slot" | "ship-size" | "fleet-size";
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:115](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L115)

<a id="message"></a>

##### message

```ts
readonly message: string;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:118](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L118)

<a id="stage"></a>

##### stage

```ts
readonly stage: number;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:117](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L117)

***

<a id="fleetdeploymentstorageaccount"></a>

### FleetDeploymentStorageAccount

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:74](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L74)

One account a deployment stage resizes or settles at an unchanged size.

#### Example

```ts
declare const account: FleetDeploymentStorageAccount;
console.log(account.sizeAfter - account.sizeBefore, account.rentMinimum);
```

#### Properties

<a id="account"></a>

##### account

```ts
readonly account: "fleet" | "starbasePlayer";
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:75](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L75)

<a id="address"></a>

##### address

```ts
readonly address: Address | undefined;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:77](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L77)

Undefined for the new Fleet when no label was given.

<a id="rentminimum"></a>

##### rentMinimum

```ts
readonly rentMinimum: bigint;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:81](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L81)

Rent minimum of the account at `sizeAfter`, in lamports.

<a id="sizeafter"></a>

##### sizeAfter

```ts
readonly sizeAfter: number;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:79](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L79)

<a id="sizebefore"></a>

##### sizeBefore

```ts
readonly sizeBefore: number;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:78](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L78)

***

<a id="fleetdeploymentstorageestimate"></a>

### FleetDeploymentStorageEstimate

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:128](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L128)

Storage a proposed Fleet deployment needs, stage by stage.

#### Example

```ts
declare const estimate: FleetDeploymentStorageEstimate;
console.log(estimate.totalProfileDebit, estimate.unmetPrerequisites.length);
```

#### Properties

<a id="character"></a>

##### character

```ts
readonly character: Address;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:135](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L135)

<a id="characterresync"></a>

##### characterResync

```ts
readonly characterResync: "excluded";
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:144](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L144)

<a id="observedslot"></a>

##### observedSlot

```ts
readonly observedSlot: bigint;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:137](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L137)

Slot of the StarbasePlayer read the estimate is based on.

<a id="profile"></a>

##### profile

```ts
readonly profile: Address;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:134](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L134)

<a id="profileunit"></a>

##### profileUnit

```ts
readonly profileUnit: "lamports";
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:142](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L142)

<a id="rent"></a>

##### rent

```ts
readonly rent: {
  exemptionThreshold: number;
  lamportsPerByteYear: bigint;
};
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:138](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L138)

###### exemptionThreshold

```ts
readonly exemptionThreshold: number;
```

###### lamportsPerByteYear

```ts
readonly lamportsPerByteYear: bigint;
```

<a id="stages"></a>

##### stages

```ts
readonly stages: readonly FleetDeploymentStorageStage[];
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:129](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L129)

<a id="totalprofiledebit"></a>

##### totalProfileDebit

```ts
readonly totalProfileDebit: bigint;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:132](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L132)

Sum of the stage debits. No refund or freed storage is credited, so this
is also the peak the Profile must hold above its own rent reserve.

<a id="transactionfees"></a>

##### transactionFees

```ts
readonly transactionFees: "excluded";
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:143](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L143)

<a id="unmetprerequisites"></a>

##### unmetPrerequisites

```ts
readonly unmetPrerequisites: readonly FleetDeploymentPrerequisite[];
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:133](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L133)

#### Methods

<a id="tojson"></a>

##### toJSON()

```ts
toJSON(): unknown;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:145](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L145)

###### Returns

`unknown`

***

<a id="fleetdeploymentstorageinput"></a>

### FleetDeploymentStorageInput

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:47](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L47)

A proposed Fleet deployment, sized before any of it runs.

#### Example

```ts
declare const starbasePlayer: Address;
const input: FleetDeploymentStorageInput = {
  starbasePlayer,
  label: 'Miner 6',
  ships: [{ shipId: 1301, amount: 1n }],
  cargoIds: [7560],
};
```

#### Properties

<a id="cargoids"></a>

##### cargoIds?

```ts
readonly optional cargoIds?: readonly number[];
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:64](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L64)

Cargo ids loaded into the new Fleet's cargo hold. Fuel and ammo use fixed
slots, so leaving them out tightens the bound.

<a id="disband"></a>

##### disband?

```ts
readonly optional disband?: Address;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:52](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L52)

An owned Fleet Docked at the same Starbase to disband first.

<a id="label"></a>

##### label?

```ts
readonly optional label?: string;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:56](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L56)

The new Fleet's label. With it, the estimate reads the Fleet's address
and credits lamports already sent there; without it, the Fleet is assumed
to hold none.

<a id="ships"></a>

##### ships

```ts
readonly ships: readonly {
  amount: bigint;
  shipId: number;
}[];
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:58](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L58)

Ship configurations to add, one assembly per entry, in order.

<a id="starbaseplayer"></a>

##### starbasePlayer

```ts
readonly starbasePlayer: Address;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:50](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L50)

The StarbasePlayer the Fleet is created at; it holds the hulls,
components and cargo the deployment draws on.

***

<a id="planaddshiptofleetoptions"></a>

### PlanAddShipToFleetOptions

Defined in: [packages/sage/src/fleets/actions/add-ship.ts:24](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/add-ship.ts#L24)

Explicit address-only selection of escrowed ships for an owned Docked Fleet.

#### Example

```ts
declare const profile: Address, authority: Address;
const options: PlanAddShipToFleetOptions = {authorization:{profile,authority,keyIndex:0},shipId:1,amount:1n};
```

#### Properties

<a id="amount"></a>

##### amount

```ts
readonly amount: bigint;
```

Defined in: [packages/sage/src/fleets/actions/add-ship.ts:27](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/add-ship.ts#L27)

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/add-ship.ts:25](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/add-ship.ts#L25)

<a id="shipid"></a>

##### shipId

```ts
readonly shipId: number;
```

Defined in: [packages/sage/src/fleets/actions/add-ship.ts:26](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/add-ship.ts#L26)

***

<a id="plancreatefleetoptions"></a>

### PlanCreateFleetOptions

Defined in: [packages/sage/src/fleets/actions/create-fleet.ts:24](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/create-fleet.ts#L24)

Address-only options for creating an empty Fleet at an existing own-faction StarbasePlayer.

#### Example

```ts
declare const profile:Address, authority:Address, system:Address;
const options:PlanCreateFleetOptions={authorization:{profile,authority,keyIndex:0},system,label:'Scout'};
```

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/create-fleet.ts:25](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/create-fleet.ts#L25)

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

##### label

```ts
readonly label: string;
```

Defined in: [packages/sage/src/fleets/actions/create-fleet.ts:27](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/create-fleet.ts#L27)

<a id="system"></a>

##### system

```ts
readonly system: Address;
```

Defined in: [packages/sage/src/fleets/actions/create-fleet.ts:26](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/create-fleet.ts#L26)

***

<a id="plandepositshipstogameoptions"></a>

### PlanDepositShipsToGameOptions

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:60](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L60)

Exact whole ships to import under one explicit configuration ID.
Optional escrow creation requires an explicit payer; it never registers onboarding accounts.

#### Example

```ts
declare const owner: Address;
declare const authorization: PlanAuthorization;
const options: PlanDepositShipsToGameOptions = { shipId: 1, amount: 2n, owner, authorization };
```

#### Properties

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

##### amount

```ts
readonly amount: bigint;
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:62](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L62)

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:64](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L64)

<a id="escrowaccount"></a>

##### escrowAccount?

```ts
readonly optional escrowAccount?: {
  mode: "create-if-missing";
  payer: Address;
};
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:66](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L66)

###### mode

```ts
readonly mode: "create-if-missing";
```

###### payer

```ts
readonly payer: Address;
```

<a id="owner"></a>

##### owner

```ts
readonly owner: Address;
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:63](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L63)

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

##### shipId

```ts
readonly shipId: number;
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:61](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L61)

<a id="source"></a>

##### source?

```ts
readonly optional source?: Address;
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:65](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L65)

***

<a id="planfleetcrewtransferoptions"></a>

### PlanFleetCrewTransferOptions

Defined in: [packages/sage/src/fleets/actions/crew-transfer.ts:18](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/crew-transfer.ts#L18)

Direct player authorization and the positive count for ordinary Docked Fleet crew transfer.

#### Example

```ts
declare const authorization: PlanAuthorization;
const options: PlanFleetCrewTransferOptions = { authorization, count: 1 };
```

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/crew-transfer.ts:19](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/crew-transfer.ts#L19)

<a id="count"></a>

##### count

```ts
readonly count: number;
```

Defined in: [packages/sage/src/fleets/actions/crew-transfer.ts:20](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/crew-transfer.ts#L20)

***

<a id="planfleetdisbandoptions"></a>

### PlanFleetDisbandOptions

Defined in: [packages/sage/src/fleets/actions/disband.ts:28](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/disband.ts#L28)

Explicit address-only authorization for disbanding an owned Docked Fleet.

#### Example

```ts
declare const profile: Address, authority: Address;
const options: PlanFleetDisbandOptions = { authorization: { profile, authority, keyIndex: 0 } };
```

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/disband.ts:29](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/disband.ts#L29)

***

<a id="planfleetdockoptions"></a>

### PlanFleetDockOptions

Defined in: [packages/sage/src/fleets/actions/index.ts:135](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L135)

Inputs for planning one idle-to-docked Fleet transition.

#### Example

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

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/index.ts:136](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L136)

***

<a id="planfleetrespawnoptions"></a>

### PlanFleetRespawnOptions

Defined in: [packages/sage/src/fleets/actions/respawn.ts:17](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/respawn.ts#L17)

Direct player authorization and the faction CSS System for explicit timed recovery.

#### Example

```ts
declare const authorization: PlanAuthorization, system: Address;
const options: PlanFleetRespawnOptions = { authorization, system };
```

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/respawn.ts:18](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/respawn.ts#L18)

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

##### system

```ts
readonly system: Address;
```

Defined in: [packages/sage/src/fleets/actions/respawn.ts:19](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/respawn.ts#L19)

***

<a id="planfleetsettlearrivaloptions"></a>

### PlanFleetSettleArrivalOptions

Defined in: [packages/sage/src/fleets/actions/index.ts:205](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L205)

The funder of a completed Fleet journey's settlement.

Settlement needs no Profile authority: any funder may sign it. The funder
receives the Fleet account rent the settlement frees, so pass a wallet the
Fleet owner controls unless you mean to collect it.

#### Example

```ts
declare const funder: Address;
const options: PlanFleetSettleArrivalOptions = { funder };
```

#### Properties

<a id="funder"></a>

##### funder

```ts
readonly funder: Address;
```

Defined in: [packages/sage/src/fleets/actions/index.ts:206](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L206)

***

<a id="planfleetstopsubwarpoptions"></a>

### PlanFleetStopSubwarpOptions

Defined in: [packages/sage/src/fleets/actions/index.ts:217](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L217)

Inputs for stopping one Fleet subwarp early.

#### Example

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

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/index.ts:218](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L218)

***

<a id="planfleetundockoptions"></a>

### PlanFleetUndockOptions

Defined in: [packages/sage/src/fleets/actions/index.ts:123](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L123)

Inputs for planning one docked-to-idle Fleet transition.

#### Example

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

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/index.ts:124](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L124)

***

<a id="planfleetwarplaneoptions"></a>

### PlanFleetWarpLaneOptions

Defined in: [packages/sage/src/fleets/actions/index.ts:188](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L188)

Inputs for planning one explicit connected-system Fleet warp.

#### Example

```ts
declare const authorization: PlanAuthorization;
declare const destinationSystem: Address;
const options: PlanFleetWarpLaneOptions = {
  authorization,
  destinationSystem,
};
```

#### Properties

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

##### authorization

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

Defined in: [packages/sage/src/fleets/actions/index.ts:189](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L189)

<a id="destinationsystem"></a>

##### destinationSystem

```ts
readonly destinationSystem: Address;
```

Defined in: [packages/sage/src/fleets/actions/index.ts:190](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L190)

## Type Aliases

<a id="fleetdeploymentstoragestage"></a>

### FleetDeploymentStorageStage

```ts
type FleetDeploymentStorageStage = {
  accounts: readonly FleetDeploymentStorageAccount[];
  profileDebit: bigint;
} & 
  | {
  fleet: Address;
  kind: "disband";
}
  | {
  kind: "create";
}
  | {
  amount: bigint;
  kind: "add-ships";
  shipId: number;
}
  | {
  cargoIds: readonly number[];
  kind: "load-cargo";
};
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:91](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L91)

One stage of a Fleet deployment and its gross Profile storage debit.

#### Type Declaration

##### accounts

```ts
readonly accounts: readonly FleetDeploymentStorageAccount[];
```

##### profileDebit

```ts
readonly profileDebit: bigint;
```

Upper bound on the lamports this stage withdraws from the Profile.

#### Example

```ts
declare const stage: FleetDeploymentStorageStage;
if (stage.kind === 'add-ships') console.log(stage.shipId, stage.profileDebit);
```

***

<a id="fleetdockdebitbounds"></a>

### FleetDockDebitBounds

```ts
type FleetDockDebitBounds = 
  | {
  reason:   | DockBoundsUnavailableReason
     | "not-fleet-dock"
     | "multiple-fleet-docks"
     | "combined-plan"
     | "unqualified-deployment";
  status: "unavailable";
  toJSON: unknown;
}
  | {
  fleet: Address;
  maximumFleetGrowthBytes: 40;
  maximumProfileDebit: bigint;
  profile: Address;
  profileUnit: "lamports";
  starbasePlayer: Address;
  status: "available";
  transactionFees: "excluded";
  toJSON: unknown;
};
```

Defined in: [packages/sage/src/fleets/actions/dock-bounds.ts:20](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/dock-bounds.ts#L20)

Conservative gross Profile storage debit for qualified ordinary docking.
Surplus and refunds are not credited; unavailable never implies zero cost.

#### Example

```ts
declare const bounds: FleetDockDebitBounds;
if (bounds.status === 'available') console.log(bounds.maximumProfileDebit);
```

***

<a id="planfleetcoordinatemovementoptions"></a>

### PlanFleetCoordinateMovementOptions

```ts
type PlanFleetCoordinateMovementOptions = 
  | {
  authorization: PlanAuthorization;
  destination: FleetSnapshot["location"];
  destinationRaw?: never;
}
  | {
  authorization: PlanAuthorization;
  destination?: never;
  destinationRaw: {
     x: bigint;
     y: bigint;
  };
};
```

Defined in: [packages/sage/src/fleets/actions/index.ts:161](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L161)

Inputs for planning one explicit coordinate-destination Fleet movement.

Choose exactly one representation. `destination` accepts display numbers and
applies the generated I8F56 codec's rounding. `destinationRaw` preserves an
exact signed-I8F56 value, such as a Star System's `coordinatesRaw`.

#### Example

```ts
declare const authorization: PlanAuthorization;
declare const destinationSystem: {
  readonly coordinatesRaw: { readonly x: bigint; readonly y: bigint };
};
const displayOptions: PlanFleetCoordinateMovementOptions = {
  authorization,
  destination: { x: 12, y: -7 },
};
const exactOptions: PlanFleetCoordinateMovementOptions = {
  authorization,
  destinationRaw: destinationSystem.coordinatesRaw,
};
```

## Functions

<a id="estimatefleetdeploymentstorage"></a>

### estimateFleetDeploymentStorage()

```ts
function estimateFleetDeploymentStorage(ctx, input): Promise<FleetDeploymentStorageEstimate>;
```

Defined in: [packages/sage/src/fleets/actions/deployment-storage.ts:241](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/deployment-storage.ts#L241)

Estimates the Profile storage funding a proposed Fleet deployment needs
before any of it runs: optionally disbanding a Docked Fleet, creating an
empty Fleet, adding ship configurations in order (with their components) and
loading its initial cargo hold. Each stage reports the accounts it settles,
their sizes and rent minimums, and an upper bound on its Profile debit.

Verified against the program's behaviour: each stage sets every resized
account to the rent minimum of its new size, withdrawing a shortfall from
the Profile. A disband grows the StarbasePlayer by a hangar entry per ship id
and a cargo line per cargo id it lacks. Creation funds the empty Fleet less
any lamports already at its address. Each assembly adds a ship line and the
configuration's component lines to the Fleet, and a hangar entry to the
StarbasePlayer when it has none for that configuration; it settles the
StarbasePlayer's rent even when its size is unchanged. Loading cargo adds a
cargo hold line per new cargo id; loading crew resizes nothing, so it has no
stage. Observed balances count for the first stage that touches an account;
later stages assume it was left at its rent minimum. The disbanded Fleet's
refund, lines that empty and any other freed storage are never credited.

Unmet Character or StarbasePlayer requirements (a free Fleet slot, maximum
ship size, research, Fleet size, components) are listed, not enforced, so a
roster can be sized before it is eligible. A roster no Character can field
(above the Game's Fleet size, or too many Commanders or Titans) is refused.
Hull availability, transaction fees, the Profile's own rent reserve and a
Character resynchronization are not included. Plan each real stage with its
planner after the previous one confirms.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `input` | [`FleetDeploymentStorageInput`](/reference/fleets/actions/#fleetdeploymentstorageinput) |

#### Returns

`Promise`\<[`FleetDeploymentStorageEstimate`](/reference/fleets/actions/#fleetdeploymentstorageestimate)\>

#### Example

```ts
import { estimateFleetDeploymentStorage } from '@aephia/atlas-kit/fleets/actions';

declare const ctx: SageContext;
declare const starbasePlayer: Address;
declare const oldFleet: Address;
const estimate = await estimateFleetDeploymentStorage(ctx, {
  starbasePlayer,
  disband: oldFleet,
  label: 'Miner 6',
  ships: [{ shipId: 1301, amount: 1n }],
  cargoIds: [7560],
});
for (const stage of estimate.stages) console.log(stage.kind, stage.profileDebit);
for (const missing of estimate.unmetPrerequisites) console.log(missing.message);
console.log(`Profile needs ${estimate.totalProfileDebit} lamports above its reserve`);
```

***

<a id="getfleetdockdebitbounds"></a>

### getFleetDockDebitBounds()

```ts
function getFleetDockDebitBounds(plan): FleetDockDebitBounds;
```

Defined in: [packages/sage/src/fleets/actions/dock-bounds.ts:54](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/dock-bounds.ts#L54)

Inspects the persisted docking ceiling without network I/O. Inspect individual
Plans before combining distinct Fleets. The ceiling is qualified for the
z.ink PTR deployment only; any other deployment is `unqualified-deployment`. Fresh pre-sign checks are not an atomic
on-chain spending cap; state can change before landing.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `plan` | [`Plan`](/reference/planning/#plan) |

#### Returns

[`FleetDockDebitBounds`](/reference/fleets/actions/#fleetdockdebitbounds)

#### Example

```ts
declare const plan: Plan;
const bounds = getFleetDockDebitBounds(plan);
if (bounds.status === 'available') console.log(bounds.maximumProfileDebit);
```

***

<a id="planaddshiptofleet"></a>

### planAddShipToFleet()

```ts
function planAddShipToFleet(
   ctx, 
   fleet, 
input): Promise<Plan>;
```

Defined in: [packages/sage/src/fleets/actions/add-ship.ts:90](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/add-ship.ts#L90)

Plans one singleton transfer of an exact ship configuration from StarbasePlayer entitlement to an owned Docked Fleet.
Follows the program's assembly rules for ships of any size: each ship must be
within the Character's maximum ship size and its research tags must all be
held; the resulting Fleet's points (XXS 1, XS 4, Small 9, Medium 16, Large 25,
Capital 36, Commander 49, Titan 128) must fit both the Character's Fleet size
and the Game limit, with at most one Titan and two Commanders and Titans
together. Escrowed hulls of any configuration of the same ship count, as the
program re-tags them. A configuration's components, times the amount, move
from the StarbasePlayer's cargo into the Fleet's components, where they stay;
the StarbasePlayer must hold them all. Any Starbase with a current
StarbasePlayer of the Fleet's faction works. Fleets built under older ship
definitions are not planned; sync those with `planSyncFleetWithGame` first.
The explicit ship ID must be a u16 and the whole ship amount must be 1n through 255n. Uses a direct Profile
AUTH key or a manageFleet key scoped to SAGE or the Fleet; a positive Profile
rent shortfall additionally requires vault-funding permission. No token
transfer or onboarding occurs.
A rented Fleet is refused, as is a Fleet whose HP plus pending repair cannot
reach its maximum; the program also needs full AP and SP, which recover on
timers and stay chain-authoritative.
Final stats, research, refresh and outcomes remain chain-authoritative.
Simulate before signing. The observed debit ceiling is rechecked before
signing and is not an atomic on-chain spending cap. Two assembly Plans for the same Profile
cannot compose because they share funds and assembly state.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `input` | [`PlanAddShipToFleetOptions`](/reference/fleets/actions/#planaddshiptofleetoptions) |

#### Returns

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

#### Example

```ts
declare const ctx:SageContext, fleet:Address, profile:Address, authority:Address;
const plan = await planAddShipToFleet(ctx,fleet,{authorization:{profile,authority,keyIndex:0},shipId:1,amount:1n});
console.log(plan.describe());
```

***

<a id="plancreatefleet"></a>

### planCreateFleet()

```ts
function planCreateFleet(ctx, input): Promise<Plan>;
```

Defined in: [packages/sage/src/fleets/actions/create-fleet.ts:69](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/create-fleet.ts#L69)

Plans a standalone empty Docked Fleet, without signing or submitting.
Derives all account addresses from the configured Game, Profile, exact label
and System. Accepted label bytes are preserved. Requires an existing own-faction
StarbasePlayer, a direct Profile AUTH or SAGE manageFleet key, and available
stored Character capacity. The Profile pays only the Fleet target's rent
shortfall; a non-AUTH key needs drainSolVault only for a positive debit.
The observed debit is checked again before signing; it is not an atomic
on-chain spending cap. Final rent and funding remain chain-authoritative.
No implicit key grants, registration or funding occurs. Final modifier refresh
and deployed eligibility remain chain-authoritative: simulate before signing.
Creation Plans for the same Character cannot be combined.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `input` | [`PlanCreateFleetOptions`](/reference/fleets/actions/#plancreatefleetoptions) |

#### Returns

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

#### Example

```ts
declare const ctx:SageContext, profile:Address, authority:Address, system:Address;
const plan=await planCreateFleet(ctx,{authorization:{profile,authority,keyIndex:0},system,label:'Scout'});
console.log(plan.describe());
```

***

<a id="plandepositshipstogame"></a>

### planDepositShipsToGame()

```ts
function planDepositShipsToGame(
   ctx, 
   starbase, 
options): Promise<Plan>;
```

Defined in: [packages/sage/src/fleets/actions/ship-import.ts:188](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/ship-import.ts#L188)

Plans importing whole ship tokens into a registered player's CSS ship escrow.
Requires direct Profile AUTH and token-owner authorization. The Profile vault
funds any StarbasePlayer storage shortfall; an explicit ATA payer funds optional
escrow creation. Fees are separate. No Fleet is created and no signer is retained.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `starbase` | `ShipImportStarbaseIntent` |
| `options` | [`PlanDepositShipsToGameOptions`](/reference/fleets/actions/#plandepositshipstogameoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const starbase: import('@aephia/atlas-kit/starbases').StarbasePlayerSnapshot;
declare const options: PlanDepositShipsToGameOptions;
const plan = await planDepositShipsToGame(ctx, starbase, options);
console.log(plan.describe());
```

***

<a id="planfleetcompleterespawn"></a>

### planFleetCompleteRespawn()

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

Defined in: [packages/sage/src/fleets/actions/respawn.ts:130](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/respawn.ts#L130)

Prepares timed completion only after the stored Respawn end time according to chain Clock.
Uses the explicit Respawn-to-Docked route; never pays to bypass the timer.
Refresh confirmed state to establish arrival at the faction CSS; simulation is not confirmation.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `options` | [`PlanFleetRespawnOptions`](/reference/fleets/actions/#planfleetrespawnoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address, options: PlanFleetRespawnOptions;
const plan = await planFleetCompleteRespawn(ctx, fleet, options);
console.log(plan.describe());
```

***

<a id="planfleetdisband"></a>

### planFleetDisband()

```ts
function planFleetDisband(
   ctx, 
   fleet, 
input): Promise<Plan>;
```

Defined in: [packages/sage/src/fleets/actions/disband.ts:70](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/disband.ts#L70)

Plans disbanding an owned Docked Fleet, the game's only way to take a Fleet
apart. Verified against the program's behaviour: the Fleet's ships return to
the StarbasePlayer's hangar where it is Docked, its crew to that
StarbasePlayer, and its fuel, ammo, cargo hold and components merge into the
StarbasePlayer's cargo. The Character's Fleet slot is freed and the Fleet
closes, refunding its rent to the Profile. To replace a composition, disband,
confirm, then plan `planCreateFleet` and `planAddShipToFleet` from fresh
state; disband and creation for the same Character cannot be combined.

The Fleet must be a canonical owned player Fleet, not rented, Docked at a
Starbase where the Character has a current StarbasePlayer of its faction,
fully repaired, with no warp or scan cooldown running. The program also
needs full AP and SP, which recover on timers and stay chain-authoritative.
Uses a direct Profile AUTH key or a manageFleet key scoped to SAGE or the
Fleet. New hangar entries and cargo lines grow the StarbasePlayer, and the
program funds that growth from the Profile vault; that debit is bounded and
rechecked before signing, but it is not an atomic on-chain spending cap.
Any change to the Fleet after planning refuses the Plan. Simulate before
signing, then read the StarbasePlayer back after confirmation.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `input` | [`PlanFleetDisbandOptions`](/reference/fleets/actions/#planfleetdisbandoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address, profile: Address, authority: Address;
const plan = await planFleetDisband(ctx, fleet, { authorization: { profile, authority, keyIndex: 0 } });
console.log(plan.describe());
```

***

<a id="planfleetdock"></a>

### planFleetDock()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1759](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1759)

Plans one explicit Fleet dock without signing, simulation, or write RPC.

The planner accepts a loaded idle or refreshable warp Fleet snapshot,
resolves the only canonical Character, Star System at its action coordinate,
and Starbase Player internally, and returns one inspectable idle-to-docked
Plan. A subwarp snapshot is refused: the dock step refreshes the Fleet
without its Character and cannot settle a subwarp journey, so settle the
arrival or stop the subwarp first.

Docking is admitted when the Starbase Player belongs to the Starbase's
controlling faction, whatever the territory and economics settings. A
foreign Starbase Player is refused while territory access is off; foreign
docking under territory access and dynamic-faction Starbases are refused as
unsupported.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetDockOptions`](/reference/fleets/actions/#planfleetdockoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetDock(ctx, fleet, { authorization });
console.log(plan.describe());
```

***

<a id="planfleetsettlearrival"></a>

### planFleetSettleArrival()

```ts
function planFleetSettleArrival(
   ctx, 
   fleet, 
input): Promise<Plan>;
```

Defined in: [packages/sage/src/fleets/actions/index.ts:1451](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1451)

Plans settlement of a subwarp or warp journey whose scheduled time has
elapsed on the chain clock.

Settlement is permissionless: the funder signs alone, needs no Profile key,
and receives the Fleet account rent the settlement frees. The Plan names the
owning Profile's Character and its Career XP accounts, which must already
exist and be reconciled on a Game version 2 runtime. Journeys that have not
yet arrived and Idle Fleets fail locally; planning and execution read fresh
accounts and chain time, never the host clock.

Settlement does not guarantee reaching the destination: insufficient Fuel can
leave a subwarp Fleet Idle short of it. Low Fuel produces a planning-time
warning, not a rejection. Inspect refreshed state and location after
confirmation. Subwarp settles fuel and Pilot XP; warp fuel and XP were
charged at departure. Warp cooldown is unchanged.

The journey checks are the SDK's, made before signing; they are not an
on-chain assertion. The instruction names the Fleet, not the planned
journey. If another journey replaces it before the transaction lands, the
handler settles that journey when it has already elapsed and otherwise
leaves the Fleet travelling; it never stops a journey in transit.
Intentional early stopping remains the separate
[planFleetStopSubwarp](/reference/fleets/actions/#planfleetstopsubwarp) operation.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `input` | [`PlanFleetSettleArrivalOptions`](/reference/fleets/actions/#planfleetsettlearrivaloptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const funder: Address;
const plan = await planFleetSettleArrival(ctx, fleet, { funder });
console.log(plan.describe());
```

***

<a id="planfleetstartrespawn"></a>

### planFleetStartRespawn()

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

Defined in: [packages/sage/src/fleets/actions/respawn.ts:113](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/respawn.ts#L113)

Prepares explicit timed recovery for an owned Idle Fleet, including a zero-Fuel Fleet.
Requires Character ATLAS for the current hull recovery fees. Never deposits funds,
signs, submits, waits or automatically falls back from movement. Recovery may lose assets.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `options` | [`PlanFleetRespawnOptions`](/reference/fleets/actions/#planfleetrespawnoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address, options: PlanFleetRespawnOptions;
const plan = await planFleetStartRespawn(ctx, fleet, options);
console.log(plan.describe());
```

***

<a id="planfleetstopsubwarp"></a>

### planFleetStopSubwarp()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1530](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1530)

Plans an early Fleet subwarp stop without signing, simulation, or write RPC.

This operation stops an in-progress subwarp before arrival. Use
[planFleetSettleArrival](/reference/fleets/actions/#planfleetsettlearrival) for a trip already known to have completed;
callers should not deliberately stop a completed trip. An idle Fleet is
still accepted so the program's benign no-op handles the normal race where
subwarp completes between planning and execution.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetStopSubwarpOptions`](/reference/fleets/actions/#planfleetstopsubwarpoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetStopSubwarp(ctx, fleet, { authorization });
console.log(plan.describe());
```

***

<a id="planfleetsubwarp"></a>

### planFleetSubwarp()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1383](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1383)

Plans one explicit Fleet subwarp to a display or exact raw coordinate without movement estimates.

A coordinate outside every Region is deep space and carries no Region hint.
A player Fleet may cross deep space, but stopping there needs the Character's
High Risk zone access; NPC Fleets need none. The Plan guards only the
Regions whose bounding boxes overlap the straight path's, plus the Region
count, so a Starbase capture or upgrade elsewhere leaves it valid.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetCoordinateMovementOptions`](/reference/fleets/actions/#planfleetcoordinatemovementoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetSubwarp(ctx, fleet, {
  authorization,
  destinationRaw: { x: 12n << 56n, y: -(7n << 56n) },
});
```

***

<a id="planfleetundock"></a>

### planFleetUndock()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1616](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1616)

Plans one explicit Fleet undock without signing, simulation, or write RPC.

The planner accepts a loaded Fleet snapshot, resolves its canonical Character,
docked Star System, and Starbase Player internally, and returns one inspectable
docked-to-idle Plan.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetUndockOptions`](/reference/fleets/actions/#planfleetundockoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetUndock(ctx, fleet, { authorization });
console.log(plan.describe());
```

***

<a id="planfleetwarplane"></a>

### planFleetWarpLane()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1256](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1256)

Plans one explicit connected-system Fleet warp without local economics estimates.

The planner resolves the source Star System from the Fleet's action coordinate,
proves connectivity from that System's decoded connections, and resolves all
generated instruction accounts internally. CurrencyCache shared accounting may
change; canonical identity/layout and the existing toll-input guards remain
checked before signing. The Regions containing the destination keep their
owner, safety status and risk zone, which decide destination access; other
Regions may change. Refresh and recreate older Plans to use these guards.

Connectivity does not guarantee eligibility. The program remains authoritative
for faction-relationship and destination-risk checks and any ATLAS toll.
Tested current PTR routes succeed with empty Fuel tanks. This planner does
not estimate lane costs or treat enabled cross-faction economics as blanket
permission.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetWarpLaneOptions`](/reference/fleets/actions/#planfleetwarplaneoptions) |

#### Returns

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

#### Example

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

***

<a id="planfleetwarptocoordinate"></a>

### planFleetWarpToCoordinate()

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

Defined in: [packages/sage/src/fleets/actions/index.ts:1410](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/index.ts#L1410)

Plans one explicit Fleet coordinate warp to a display or exact raw coordinate without movement estimates.

A coordinate outside every Region is deep space and carries no Region hint.
A player Fleet may cross deep space, but stopping there needs the Character's
High Risk zone access; NPC Fleets need none. The Plan guards only the
Regions whose bounding boxes overlap the straight path's, plus the Region
count, so a Starbase capture or upgrade elsewhere leaves it valid.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | [`FleetSnapshot`](/reference/fleets/#fleetsnapshot) |
| `options` | [`PlanFleetCoordinateMovementOptions`](/reference/fleets/actions/#planfleetcoordinatemovementoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetWarpToCoordinate(ctx, fleet, {
  authorization,
  destinationRaw: { x: 12n << 56n, y: -(7n << 56n) },
});
```

***

<a id="planloadfleetcrew"></a>

### planLoadFleetCrew()

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

Defined in: [packages/sage/src/fleets/actions/crew-transfer.ts:122](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/crew-transfer.ts#L122)

Loads an explicit positive u16 crew count from the canonical StarbasePlayer into a directly owned Docked Fleet.
Requires a direct Profile key with AUTH, or with the SAGE manage-crew
permission scoped to SAGE or this Fleet; current ship definitions; no
Character roster; and an absent or exact-neutral Fleet binding. Rented crew are unsupported.
Available Starbase crew exclude busy crew; capacity includes required crew and passengers.
The transfer resizes nothing. Its `maximumProfileDebit` precondition is what the
Fleet and StarbasePlayer lack of their rent minimums, usually zero, and refunds
are not credited. Transaction fees are separate.
Planning never signs or submits. This transfer must execute alone.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `options` | [`PlanFleetCrewTransferOptions`](/reference/fleets/actions/#planfleetcrewtransferoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address, authorization: PlanAuthorization;
const plan = await planLoadFleetCrew(ctx, fleet, { authorization, count: 1 });
console.log(plan.describe());
```

***

<a id="plansyncfleetwithgame"></a>

### planSyncFleetWithGame()

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

Defined in: [packages/sage/src/fleets/actions/sync.ts:34](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/sync.ts#L34)

Plans the permissionless Fleet sync with the configured Game. Verified
against the program's behaviour: it rebuilds the Fleet's ship counts and
stats from the current ship definitions and caps its AP, SP, HP and pending
repair at the new maxima, in any Fleet state. Run it, confirm it, then
replan an action that refuses a Fleet built under older ship definitions,
such as ship assembly, crew transfer or signal detection.
`deriveFleetCompositionStats` projects the rebuilt stats beforehand.

Only the Game and the Fleet are involved: no Profile key signs it and no
storage is funded, so any fee payer can submit it for any Fleet. A Fleet
already on the current definitions only has its pools capped. Simulate
before signing, then read the Fleet back after confirmation.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address;
const plan = await planSyncFleetWithGame(ctx, fleet);
console.log(plan.describe());
```

***

<a id="planunloadfleetcrew"></a>

### planUnloadFleetCrew()

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

Defined in: [packages/sage/src/fleets/actions/crew-transfer.ts:140](https://github.com/Aephia/atlas-kit/blob/v0.7.0/packages/sage/src/fleets/actions/crew-transfer.ts#L140)

Unloads an explicit positive u16 crew count from a directly owned Docked Fleet into its canonical StarbasePlayer.
Unloading every crew member is allowed while Docked; departure requires reloading required crew.
Supports the same ordinary-crew, direct-key and Profile debit boundary as loading. Execute separately
and refresh after confirmation before preparing another transfer or movement.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `Address` |
| `options` | [`PlanFleetCrewTransferOptions`](/reference/fleets/actions/#planfleetcrewtransferoptions) |

#### Returns

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

#### Example

```ts
declare const ctx: SageContext, fleet: Address, authorization: PlanAuthorization;
const plan = await planUnloadFleetCrew(ctx, fleet, { authorization, count: 1 });
console.log(plan.describe());
```

## References

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

### PlanAuthorization

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