Skip to content
Next — unreleased

Defined in: packages/sage/src/combat/actions/index.ts:152

Public attack stance translated from the generated combat vocabulary.

const stance: FleetAttackStance = { ammoUsage: 'light' };

readonly ammoUsage: "none" | "light" | "heavy";

Defined in: packages/sage/src/combat/actions/index.ts:153


Defined in: packages/sage/src/combat/actions/index.ts:188

One requested cargo quantity from one Loot item.

const cargo: FleetLootCargoRequest = { cargoId: 1, quantityRaw: 5n };

readonly cargoId: number;

Defined in: packages/sage/src/combat/actions/index.ts:189

readonly quantityRaw: bigint;

Defined in: packages/sage/src/combat/actions/index.ts:190


Defined in: packages/sage/src/combat/actions/index.ts:202

One indexed Loot item and its requested cargo quantities.

const target: FleetLootTargetRequest = {
itemIndex: 0,
cargo: [{ cargoId: 1, quantityRaw: 5n }],
};

readonly cargo: readonly FleetLootCargoRequest[];

Defined in: packages/sage/src/combat/actions/index.ts:204

readonly itemIndex: number;

Defined in: packages/sage/src/combat/actions/index.ts:203


Defined in: packages/sage/src/combat/actions/index.ts:142

Inputs for applying one catalogued combat stimulant to an owned Fleet.

declare const authorization: PlanAuthorization;
const options: PlanFleetApplyCombatStimulantOptions = { authorization };

readonly authorization: PlanAuthorization;

Defined in: packages/sage/src/combat/actions/index.ts:143


Defined in: packages/sage/src/combat/actions/index.ts:164

Address-only signer inputs for one Fleet attack.

declare const authorization: PlanAuthorization;
declare const loot: Address;
const options: PlanFleetAttackFleetOptions = { authorization, loot };

readonly authorization: PlanAuthorization;

Defined in: packages/sage/src/combat/actions/index.ts:165

readonly loot: Address;

Defined in: packages/sage/src/combat/actions/index.ts:166


Defined in: packages/sage/src/combat/actions/index.ts:177

Address-only signer inputs for one Fleet attack against a shared Starbase.

declare const authorization: PlanAuthorization;
declare const loot: Address;
const options: PlanFleetAttackStarbaseOptions = { authorization, loot };

readonly authorization: PlanAuthorization;

Defined in: packages/sage/src/combat/actions/index.ts:178

readonly loot: Address;

Defined in: packages/sage/src/combat/actions/index.ts:179


Defined in: packages/sage/src/combat/actions/index.ts:227

Address-only authorization for one Loot retrieval.

declare const authorization: PlanAuthorization;
const options: PlanFleetRetrieveLootOptions = {
atUnixSeconds: 1_700_000_000n,
authorization,
};

readonly atUnixSeconds: bigint;

Defined in: packages/sage/src/combat/actions/index.ts:229

Explicit current Unix timestamp used only to evaluate Loot exclusivity.

readonly authorization: PlanAuthorization;

Defined in: packages/sage/src/combat/actions/index.ts:230

type FleetLootSelection = readonly FleetLootTargetRequest[];

Defined in: packages/sage/src/combat/actions/index.ts:215

Finite ordered cargo selection for one Loot retrieval.

const want: FleetLootSelection = [
{ itemIndex: 0, cargo: [{ cargoId: 1, quantityRaw: 5n }] },
];

function planFleetApplyCombatStimulant(
ctx,
fleet,
stimulant,
input): Promise<Plan>;

Defined in: packages/sage/src/combat/actions/index.ts:615

Plans application of one configured combat stimulant without predicting its effects.

The planner validates Fleet ownership and Game membership, current catalog membership, known cargo balance, crewed non-destroyed state, and fresh whole-account Fleet state. Permission, stacking, charge application, and combat arithmetic remain chain-authoritative.

ParameterType
ctxSageContext
fleetFleetSnapshot
stimulantCombatStimulantDefinition
inputPlanFleetApplyCombatStimulantOptions

Promise<Plan>

declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const stimulant: CombatStimulantDefinition;
declare const authorization: PlanAuthorization;
const plan = await planFleetApplyCombatStimulant(
ctx,
fleet,
stimulant,
{ authorization },
);
console.log(plan.describe());

function planFleetAttackFleet(
ctx,
attacker,
defender,
inputStance,
inputOptions): Promise<Plan>;

Defined in: packages/sage/src/combat/actions/index.ts:1070

Plans one singleton Fleet-on-Fleet attack without predicting its outcome.

Range, randomness, recent slot hashes, final combat arithmetic, and chain races remain authoritative. This Plan cannot be combined with another gameplay instruction because the generated program contract requires a singleton transaction.

ParameterType
ctxSageContext
attackerFleetSnapshot
defenderFleetSnapshot
inputStanceFleetAttackStance
inputOptionsPlanFleetAttackFleetOptions

Promise<Plan>

declare const ctx: SageContext;
declare const attacker: FleetSnapshot;
declare const defender: FleetSnapshot;
declare const authorization: PlanAuthorization;
declare const loot: Address;
const plan = await planFleetAttackFleet(
ctx,
attacker,
defender,
{ ammoUsage: 'light' },
{ authorization, loot },
);

function planFleetAttackStarbase(
ctx,
attacker,
target,
inputStance,
inputOptions): Promise<Plan>;

Defined in: packages/sage/src/combat/actions/index.ts:1315

Plans one singleton Fleet-on-Starbase attack without predicting its outcome.

The planner validates the owned attacking Fleet, canonical target System and nested shared Starbase, configured faction ownership mode, reward configuration, and the optional dynamic-NPC capture economy. Range, capture-cost debit outcome, randomness, damage, rewards, and final admissibility remain chain-authoritative.

Requires Disabled rent: the Game’s rent catalog and the target System’s Starbase-level rent history must not exist, and both stay guarded absent until signing.

ParameterType
ctxSageContext
attackerFleetSnapshot
targetStarSystemSnapshot
inputStanceFleetAttackStance
inputOptionsPlanFleetAttackStarbaseOptions

Promise<Plan>

declare const ctx: SageContext;
declare const attacker: FleetSnapshot;
declare const target: StarSystemSnapshot;
declare const authorization: PlanAuthorization;
declare const loot: Address;
const plan = await planFleetAttackStarbase(
ctx,
attacker,
target,
{ ammoUsage: 'light' },
{ authorization, loot },
);

function planFleetRetrieveLoot(
ctx,
fleet,
loot,
inputWant,
inputOptions): Promise<Plan>;

Defined in: packages/sage/src/combat/actions/index.ts:1870

Plans one transaction-exclusive retrieval from a loaded Loot snapshot.

The planner validates the owned idle Fleet, its normalized crew and usable ability power at atUnixSeconds, Loot identity, destroyer exclusivity and reward locks against the authorization Profile, and every requested known quantity. Retrieval spends the Fleet’s whole ability power pool. Range, recent-slot inputs, destination capacity, intervening races, and final acquired quantities remain chain-authoritative.

ParameterType
ctxSageContext
fleetFleetSnapshot
lootLootSnapshot
inputWantFleetLootSelection
inputOptionsPlanFleetRetrieveLootOptions

Promise<Plan>

declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const loot: LootSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetRetrieveLoot(
ctx,
fleet,
loot,
[{ itemIndex: 0, cargo: [{ cargoId: 1, quantityRaw: 5n }] }],
{ atUnixSeconds: 1_700_000_000n, authorization },
);
console.log(plan.describe());

Re-exports PlanAuthorization