@aephia/atlas-kit 0.6.0-next.99 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cargo/actions/deposit.d.ts +4 -1
- package/dist/cargo/actions/deposit.d.ts.map +1 -1
- package/dist/cargo/actions/deposit.js +56 -133
- package/dist/cargo/actions/deposit.js.map +1 -1
- package/dist/cargo/actions/index.d.ts +14 -7
- package/dist/cargo/actions/index.d.ts.map +1 -1
- package/dist/cargo/actions/index.js +101 -89
- package/dist/cargo/actions/index.js.map +1 -1
- package/dist/cargo/actions/wallet-context.d.ts +52 -3
- package/dist/cargo/actions/wallet-context.d.ts.map +1 -1
- package/dist/cargo/actions/wallet-context.js +118 -7
- package/dist/cargo/actions/wallet-context.js.map +1 -1
- package/dist/cargo/actions/wallet-token.d.ts +1 -6
- package/dist/cargo/actions/wallet-token.d.ts.map +1 -1
- package/dist/cargo/actions/wallet-token.js +0 -45
- package/dist/cargo/actions/wallet-token.js.map +1 -1
- package/dist/cargo/actions/withdrawal.d.ts +1 -1
- package/dist/cargo/actions/withdrawal.d.ts.map +1 -1
- package/dist/cargo/actions/withdrawal.js +37 -163
- package/dist/cargo/actions/withdrawal.js.map +1 -1
- package/dist/cargo/index.d.ts.map +1 -1
- package/dist/cargo/index.js +2 -10
- package/dist/cargo/index.js.map +1 -1
- package/dist/claim-stakes/actions/index.d.ts +80 -14
- package/dist/claim-stakes/actions/index.d.ts.map +1 -1
- package/dist/claim-stakes/actions/index.js +660 -709
- package/dist/claim-stakes/actions/index.js.map +1 -1
- package/dist/claim-stakes/index.d.ts +8 -6
- package/dist/claim-stakes/index.d.ts.map +1 -1
- package/dist/claim-stakes/index.js +12 -18
- package/dist/claim-stakes/index.js.map +1 -1
- package/dist/client/context.d.ts.map +1 -1
- package/dist/client/context.js +353 -37
- package/dist/client/context.js.map +1 -1
- package/dist/client/contracts.d.ts +54 -1
- package/dist/client/contracts.d.ts.map +1 -1
- package/dist/client/deployments.d.ts +17 -0
- package/dist/client/deployments.d.ts.map +1 -1
- package/dist/client/deployments.js +17 -0
- package/dist/client/deployments.js.map +1 -1
- package/dist/client/index.d.ts +22 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +21 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc-subscription-provider.d.ts +2 -0
- package/dist/client/rpc-subscription-provider.d.ts.map +1 -1
- package/dist/client/rpc-subscription-provider.js +135 -101
- package/dist/client/rpc-subscription-provider.js.map +1 -1
- package/dist/combat/actions/index.d.ts +30 -12
- package/dist/combat/actions/index.d.ts.map +1 -1
- package/dist/combat/actions/index.js +264 -252
- package/dist/combat/actions/index.js.map +1 -1
- package/dist/combat/index.d.ts +25 -8
- package/dist/combat/index.d.ts.map +1 -1
- package/dist/combat/index.js +21 -18
- package/dist/combat/index.js.map +1 -1
- package/dist/crafting/actions/fee-rate.d.ts +47 -0
- package/dist/crafting/actions/fee-rate.d.ts.map +1 -0
- package/dist/crafting/actions/fee-rate.js +58 -0
- package/dist/crafting/actions/fee-rate.js.map +1 -0
- package/dist/crafting/actions/index.d.ts +28 -28
- package/dist/crafting/actions/index.d.ts.map +1 -1
- package/dist/crafting/actions/index.js +243 -314
- package/dist/crafting/actions/index.js.map +1 -1
- package/dist/crafting/estimate.d.ts +101 -0
- package/dist/crafting/estimate.d.ts.map +1 -0
- package/dist/crafting/estimate.js +108 -0
- package/dist/crafting/estimate.js.map +1 -0
- package/dist/crafting/index.d.ts +6 -5
- package/dist/crafting/index.d.ts.map +1 -1
- package/dist/crafting/index.js +6 -13
- package/dist/crafting/index.js.map +1 -1
- package/dist/factions/actions/index.d.ts +1 -1
- package/dist/factions/actions/index.d.ts.map +1 -1
- package/dist/factions/actions/index.js +5 -4
- package/dist/factions/actions/index.js.map +1 -1
- package/dist/factions/index.d.ts +18 -1
- package/dist/factions/index.d.ts.map +1 -1
- package/dist/factions/index.js +24 -18
- package/dist/factions/index.js.map +1 -1
- package/dist/fleets/actions/add-ship.d.ts +18 -5
- package/dist/fleets/actions/add-ship.d.ts.map +1 -1
- package/dist/fleets/actions/add-ship.js +35 -48
- package/dist/fleets/actions/add-ship.js.map +1 -1
- package/dist/fleets/actions/create-fleet.d.ts +1 -1
- package/dist/fleets/actions/create-fleet.d.ts.map +1 -1
- package/dist/fleets/actions/create-fleet.js +8 -38
- package/dist/fleets/actions/create-fleet.js.map +1 -1
- package/dist/fleets/actions/crew-transfer.d.ts +8 -4
- package/dist/fleets/actions/crew-transfer.d.ts.map +1 -1
- package/dist/fleets/actions/crew-transfer.js +27 -42
- package/dist/fleets/actions/crew-transfer.js.map +1 -1
- package/dist/fleets/actions/deployment-storage.d.ts +161 -0
- package/dist/fleets/actions/deployment-storage.d.ts.map +1 -0
- package/dist/fleets/actions/deployment-storage.js +297 -0
- package/dist/fleets/actions/deployment-storage.js.map +1 -0
- package/dist/fleets/actions/disband.d.ts +42 -0
- package/dist/fleets/actions/disband.d.ts.map +1 -0
- package/dist/fleets/actions/disband.js +107 -0
- package/dist/fleets/actions/disband.js.map +1 -0
- package/dist/fleets/actions/index.d.ts +55 -11
- package/dist/fleets/actions/index.d.ts.map +1 -1
- package/dist/fleets/actions/index.js +282 -235
- package/dist/fleets/actions/index.js.map +1 -1
- package/dist/fleets/actions/respawn.d.ts +1 -1
- package/dist/fleets/actions/respawn.d.ts.map +1 -1
- package/dist/fleets/actions/respawn.js +8 -37
- package/dist/fleets/actions/respawn.js.map +1 -1
- package/dist/fleets/actions/ship-import.d.ts +1 -1
- package/dist/fleets/actions/ship-import.d.ts.map +1 -1
- package/dist/fleets/actions/ship-import.js +39 -91
- package/dist/fleets/actions/ship-import.js.map +1 -1
- package/dist/fleets/actions/sync.d.ts +24 -0
- package/dist/fleets/actions/sync.d.ts.map +1 -0
- package/dist/fleets/actions/sync.js +55 -0
- package/dist/fleets/actions/sync.js.map +1 -0
- package/dist/fleets/composition-stats.d.ts +101 -0
- package/dist/fleets/composition-stats.d.ts.map +1 -0
- package/dist/fleets/composition-stats.js +354 -0
- package/dist/fleets/composition-stats.js.map +1 -0
- package/dist/fleets/cooldown.d.ts +7 -4
- package/dist/fleets/cooldown.d.ts.map +1 -1
- package/dist/fleets/cooldown.js +11 -6
- package/dist/fleets/cooldown.js.map +1 -1
- package/dist/fleets/index.d.ts +1 -0
- package/dist/fleets/index.d.ts.map +1 -1
- package/dist/fleets/index.js +3 -10
- package/dist/fleets/index.js.map +1 -1
- package/dist/fleets/movement-arithmetic.d.ts.map +1 -1
- package/dist/fleets/movement-arithmetic.js +4 -0
- package/dist/fleets/movement-arithmetic.js.map +1 -1
- package/dist/fleets/subwarp-estimate.d.ts +3 -1
- package/dist/fleets/subwarp-estimate.d.ts.map +1 -1
- package/dist/fleets/subwarp-estimate.js +3 -1
- package/dist/fleets/subwarp-estimate.js.map +1 -1
- package/dist/fleets/warp-lane-policy.d.ts +13 -7
- package/dist/fleets/warp-lane-policy.d.ts.map +1 -1
- package/dist/fleets/warp-lane-policy.js +19 -7
- package/dist/fleets/warp-lane-policy.js.map +1 -1
- package/dist/identity/actions/create-profile.d.ts +1 -1
- package/dist/identity/actions/create-profile.d.ts.map +1 -1
- package/dist/identity/actions/create-profile.js +2 -2
- package/dist/identity/actions/create-profile.js.map +1 -1
- package/dist/identity/actions/index.d.ts +2 -1
- package/dist/identity/actions/index.d.ts.map +1 -1
- package/dist/identity/actions/index.js +6 -4
- package/dist/identity/actions/index.js.map +1 -1
- package/dist/identity/actions/research-unlock.d.ts +61 -0
- package/dist/identity/actions/research-unlock.d.ts.map +1 -0
- package/dist/identity/actions/research-unlock.js +166 -0
- package/dist/identity/actions/research-unlock.js.map +1 -0
- package/dist/identity/index.d.ts +62 -2
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +63 -12
- package/dist/identity/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/c4/account-decoding.d.ts +49 -0
- package/dist/internal/c4/account-decoding.d.ts.map +1 -0
- package/dist/internal/c4/account-decoding.js +74 -0
- package/dist/internal/c4/account-decoding.js.map +1 -0
- package/dist/internal/c4/career-xp.d.ts +58 -0
- package/dist/internal/c4/career-xp.d.ts.map +1 -0
- package/dist/internal/c4/career-xp.js +80 -0
- package/dist/internal/c4/career-xp.js.map +1 -0
- package/dist/internal/c4/cargo-instructions.d.ts +24 -0
- package/dist/internal/c4/cargo-instructions.d.ts.map +1 -0
- package/dist/internal/c4/cargo-instructions.js +30 -0
- package/dist/internal/c4/cargo-instructions.js.map +1 -0
- package/dist/internal/c4/cargo-pod.d.ts +15 -0
- package/dist/internal/c4/cargo-pod.d.ts.map +1 -0
- package/dist/internal/c4/cargo-pod.js +13 -0
- package/dist/internal/c4/cargo-pod.js.map +1 -0
- package/dist/internal/c4/character-modifier.d.ts +1 -1
- package/dist/internal/c4/character-modifier.d.ts.map +1 -1
- package/dist/internal/c4/character.d.ts +157 -0
- package/dist/internal/c4/character.d.ts.map +1 -0
- package/dist/internal/c4/character.js +64 -0
- package/dist/internal/c4/character.js.map +1 -0
- package/dist/internal/c4/claim-stake-building-definitions.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-building-definitions.js +2 -1
- package/dist/internal/c4/claim-stake-building-definitions.js.map +1 -1
- package/dist/internal/c4/claim-stake-configuration.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-configuration.js +5 -36
- package/dist/internal/c4/claim-stake-configuration.js.map +1 -1
- package/dist/internal/c4/claim-stake-definitions.d.ts +4 -0
- package/dist/internal/c4/claim-stake-definitions.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-definitions.js +6 -2
- package/dist/internal/c4/claim-stake-definitions.js.map +1 -1
- package/dist/internal/c4/claim-stake-plots.d.ts +17 -0
- package/dist/internal/c4/claim-stake-plots.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake-plots.js +29 -0
- package/dist/internal/c4/claim-stake-plots.js.map +1 -0
- package/dist/internal/c4/claim-stake-standing.d.ts +80 -0
- package/dist/internal/c4/claim-stake-standing.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake-standing.js +61 -0
- package/dist/internal/c4/claim-stake-standing.js.map +1 -0
- package/dist/internal/c4/claim-stake-storage.d.ts +45 -0
- package/dist/internal/c4/claim-stake-storage.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake-storage.js +207 -0
- package/dist/internal/c4/claim-stake-storage.js.map +1 -0
- package/dist/internal/c4/claim-stake.d.ts +9 -6
- package/dist/internal/c4/claim-stake.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake.js +24 -56
- package/dist/internal/c4/claim-stake.js.map +1 -1
- package/dist/internal/c4/combat-storage.d.ts +20 -0
- package/dist/internal/c4/combat-storage.d.ts.map +1 -0
- package/dist/internal/c4/combat-storage.js +43 -0
- package/dist/internal/c4/combat-storage.js.map +1 -0
- package/dist/internal/c4/combat.d.ts +1 -55
- package/dist/internal/c4/combat.d.ts.map +1 -1
- package/dist/internal/c4/combat.js +16 -180
- package/dist/internal/c4/combat.js.map +1 -1
- package/dist/internal/c4/crafting-storage.d.ts +20 -0
- package/dist/internal/c4/crafting-storage.d.ts.map +1 -0
- package/dist/internal/c4/crafting-storage.js +54 -0
- package/dist/internal/c4/crafting-storage.js.map +1 -0
- package/dist/internal/c4/crafting.d.ts +9 -1
- package/dist/internal/c4/crafting.d.ts.map +1 -1
- package/dist/internal/c4/crafting.js +38 -98
- package/dist/internal/c4/crafting.js.map +1 -1
- package/dist/internal/c4/currency-cache.d.ts +1 -1
- package/dist/internal/c4/currency-cache.d.ts.map +1 -1
- package/dist/internal/c4/currency-cache.js +6 -9
- package/dist/internal/c4/currency-cache.js.map +1 -1
- package/dist/internal/c4/discriminators.d.ts +93 -0
- package/dist/internal/c4/discriminators.d.ts.map +1 -0
- package/dist/internal/c4/discriminators.js +190 -0
- package/dist/internal/c4/discriminators.js.map +1 -0
- package/dist/internal/c4/faction-epoch-meter.d.ts.map +1 -1
- package/dist/internal/c4/faction-epoch-meter.js +5 -10
- package/dist/internal/c4/faction-epoch-meter.js.map +1 -1
- package/dist/internal/c4/faction-treasury.d.ts.map +1 -1
- package/dist/internal/c4/faction-treasury.js +11 -18
- package/dist/internal/c4/faction-treasury.js.map +1 -1
- package/dist/internal/c4/faction.d.ts +21 -0
- package/dist/internal/c4/faction.d.ts.map +1 -0
- package/dist/internal/c4/faction.js +23 -0
- package/dist/internal/c4/faction.js.map +1 -0
- package/dist/internal/c4/factions.d.ts +31 -3
- package/dist/internal/c4/factions.d.ts.map +1 -1
- package/dist/internal/c4/factions.js +103 -104
- package/dist/internal/c4/factions.js.map +1 -1
- package/dist/internal/c4/fleet-creation.d.ts +9 -2
- package/dist/internal/c4/fleet-creation.d.ts.map +1 -1
- package/dist/internal/c4/fleet-creation.js +15 -18
- package/dist/internal/c4/fleet-creation.js.map +1 -1
- package/dist/internal/c4/fleet-crew-binding.d.ts.map +1 -1
- package/dist/internal/c4/fleet-crew-binding.js +21 -49
- package/dist/internal/c4/fleet-crew-binding.js.map +1 -1
- package/dist/internal/c4/fleet-disband-layout.d.ts +7 -0
- package/dist/internal/c4/fleet-disband-layout.d.ts.map +1 -0
- package/dist/internal/c4/fleet-disband-layout.js +7 -0
- package/dist/internal/c4/fleet-disband-layout.js.map +1 -0
- package/dist/internal/c4/fleet-disband.d.ts +41 -0
- package/dist/internal/c4/fleet-disband.d.ts.map +1 -0
- package/dist/internal/c4/fleet-disband.js +86 -0
- package/dist/internal/c4/fleet-disband.js.map +1 -0
- package/dist/internal/c4/fleet-points.d.ts +3 -0
- package/dist/internal/c4/fleet-points.d.ts.map +1 -0
- package/dist/internal/c4/fleet-points.js +8 -0
- package/dist/internal/c4/fleet-points.js.map +1 -0
- package/dist/internal/c4/fleet-ship-assembly.d.ts +20 -5
- package/dist/internal/c4/fleet-ship-assembly.d.ts.map +1 -1
- package/dist/internal/c4/fleet-ship-assembly.js +62 -10
- package/dist/internal/c4/fleet-ship-assembly.js.map +1 -1
- package/dist/internal/c4/fleet-storage.d.ts +44 -0
- package/dist/internal/c4/fleet-storage.d.ts.map +1 -0
- package/dist/internal/c4/fleet-storage.js +108 -0
- package/dist/internal/c4/fleet-storage.js.map +1 -0
- package/dist/internal/c4/fleet-sync.d.ts +5 -0
- package/dist/internal/c4/fleet-sync.d.ts.map +1 -0
- package/dist/internal/c4/fleet-sync.js +15 -0
- package/dist/internal/c4/fleet-sync.js.map +1 -0
- package/dist/internal/c4/fleet.d.ts +20 -5
- package/dist/internal/c4/fleet.d.ts.map +1 -1
- package/dist/internal/c4/fleet.js +24 -84
- package/dist/internal/c4/fleet.js.map +1 -1
- package/dist/internal/c4/game.d.ts +76 -21
- package/dist/internal/c4/game.d.ts.map +1 -1
- package/dist/internal/c4/game.js +127 -116
- package/dist/internal/c4/game.js.map +1 -1
- package/dist/internal/c4/identity.d.ts +2 -153
- package/dist/internal/c4/identity.d.ts.map +1 -1
- package/dist/internal/c4/identity.js +19 -126
- package/dist/internal/c4/identity.js.map +1 -1
- package/dist/internal/c4/local-market-order.d.ts +4 -6
- package/dist/internal/c4/local-market-order.d.ts.map +1 -1
- package/dist/internal/c4/local-market-order.js +5 -6
- package/dist/internal/c4/local-market-order.js.map +1 -1
- package/dist/internal/c4/loot-layout.js +1 -1
- package/dist/internal/c4/loot-layout.js.map +1 -1
- package/dist/internal/c4/loot.d.ts +89 -0
- package/dist/internal/c4/loot.d.ts.map +1 -0
- package/dist/internal/c4/loot.js +109 -0
- package/dist/internal/c4/loot.js.map +1 -0
- package/dist/internal/c4/loyalty.d.ts +7 -3
- package/dist/internal/c4/loyalty.d.ts.map +1 -1
- package/dist/internal/c4/loyalty.js +41 -130
- package/dist/internal/c4/loyalty.js.map +1 -1
- package/dist/internal/c4/market-storage.d.ts +25 -0
- package/dist/internal/c4/market-storage.d.ts.map +1 -0
- package/dist/internal/c4/market-storage.js +53 -0
- package/dist/internal/c4/market-storage.js.map +1 -0
- package/dist/internal/c4/market.d.ts +3 -0
- package/dist/internal/c4/market.d.ts.map +1 -1
- package/dist/internal/c4/market.js +20 -76
- package/dist/internal/c4/market.js.map +1 -1
- package/dist/internal/c4/mining-instructions.d.ts +1 -1
- package/dist/internal/c4/mining-instructions.d.ts.map +1 -1
- package/dist/internal/c4/mining-instructions.js +1 -1
- package/dist/internal/c4/mining-instructions.js.map +1 -1
- package/dist/internal/c4/open-signal.d.ts +1 -1
- package/dist/internal/c4/open-signal.d.ts.map +1 -1
- package/dist/internal/c4/open-signal.js +1 -1
- package/dist/internal/c4/open-signal.js.map +1 -1
- package/dist/internal/c4/pda.d.ts +49 -1
- package/dist/internal/c4/pda.d.ts.map +1 -1
- package/dist/internal/c4/pda.js +122 -17
- package/dist/internal/c4/pda.js.map +1 -1
- package/dist/internal/c4/profile-faction.d.ts +2 -1
- package/dist/internal/c4/profile-faction.d.ts.map +1 -1
- package/dist/internal/c4/profile-faction.js +36 -72
- package/dist/internal/c4/profile-faction.js.map +1 -1
- package/dist/internal/c4/profile-permissions.d.ts +1 -1
- package/dist/internal/c4/profile-permissions.d.ts.map +1 -1
- package/dist/internal/c4/profile-permissions.js +16 -1
- package/dist/internal/c4/profile-permissions.js.map +1 -1
- package/dist/internal/c4/rewards.d.ts +1 -34
- package/dist/internal/c4/rewards.d.ts.map +1 -1
- package/dist/internal/c4/rewards.js +23 -170
- package/dist/internal/c4/rewards.js.map +1 -1
- package/dist/internal/c4/runtime-bindings.d.ts +1 -1
- package/dist/internal/c4/runtime-bindings.d.ts.map +1 -1
- package/dist/internal/c4/runtime-bindings.js +1 -1
- package/dist/internal/c4/runtime-bindings.js.map +1 -1
- package/dist/internal/c4/scan-lifecycle.d.ts +21 -3
- package/dist/internal/c4/scan-lifecycle.d.ts.map +1 -1
- package/dist/internal/c4/scan-lifecycle.js +35 -44
- package/dist/internal/c4/scan-lifecycle.js.map +1 -1
- package/dist/internal/c4/scan-storage.d.ts +7 -0
- package/dist/internal/c4/scan-storage.d.ts.map +1 -0
- package/dist/internal/c4/scan-storage.js +10 -0
- package/dist/internal/c4/scan-storage.js.map +1 -0
- package/dist/internal/c4/scanning.d.ts +3 -13
- package/dist/internal/c4/scanning.d.ts.map +1 -1
- package/dist/internal/c4/scanning.js +25 -75
- package/dist/internal/c4/scanning.js.map +1 -1
- package/dist/internal/c4/ship-stats.d.ts.map +1 -1
- package/dist/internal/c4/ship-stats.js +24 -26
- package/dist/internal/c4/ship-stats.js.map +1 -1
- package/dist/internal/c4/starbase.d.ts.map +1 -1
- package/dist/internal/c4/starbase.js +24 -96
- package/dist/internal/c4/starbase.js.map +1 -1
- package/dist/internal/c4/stimulant.d.ts +26 -0
- package/dist/internal/c4/stimulant.d.ts.map +1 -0
- package/dist/internal/c4/stimulant.js +36 -0
- package/dist/internal/c4/stimulant.js.map +1 -0
- package/dist/internal/c4/wallet-cargo-cache.js +2 -1
- package/dist/internal/c4/wallet-cargo-cache.js.map +1 -1
- package/dist/internal/c4/world.d.ts +6 -2
- package/dist/internal/c4/world.d.ts.map +1 -1
- package/dist/internal/c4/world.js +32 -107
- package/dist/internal/c4/world.js.map +1 -1
- package/dist/internal/fleet-route.d.ts +12 -0
- package/dist/internal/fleet-route.d.ts.map +1 -0
- package/dist/internal/fleet-route.js +11 -0
- package/dist/internal/fleet-route.js.map +1 -0
- package/dist/internal/fleet.d.ts +3 -3
- package/dist/internal/fleet.d.ts.map +1 -1
- package/dist/internal/fleet.js +1 -5
- package/dist/internal/fleet.js.map +1 -1
- package/dist/internal/loyalty-atlas-bank-state.d.ts +3 -2
- package/dist/internal/loyalty-atlas-bank-state.d.ts.map +1 -1
- package/dist/internal/loyalty-atlas-bank-state.js +4 -3
- package/dist/internal/loyalty-atlas-bank-state.js.map +1 -1
- package/dist/internal/planning/account-state.d.ts +6 -0
- package/dist/internal/planning/account-state.d.ts.map +1 -1
- package/dist/internal/planning/account-state.js +13 -0
- package/dist/internal/planning/account-state.js.map +1 -1
- package/dist/internal/planning/arrival-guards.d.ts +0 -1
- package/dist/internal/planning/arrival-guards.d.ts.map +1 -1
- package/dist/internal/planning/arrival-guards.js +3 -18
- package/dist/internal/planning/arrival-guards.js.map +1 -1
- package/dist/internal/planning/authorization-adapter.d.ts +34 -11
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
- package/dist/internal/planning/authorization-adapter.js +116 -12
- package/dist/internal/planning/authorization-adapter.js.map +1 -1
- package/dist/internal/planning/cargo-storage-actions.d.ts +8 -0
- package/dist/internal/planning/cargo-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/cargo-storage-actions.js +97 -0
- package/dist/internal/planning/cargo-storage-actions.js.map +1 -0
- package/dist/internal/planning/character-access.d.ts +28 -0
- package/dist/internal/planning/character-access.d.ts.map +1 -0
- package/dist/internal/planning/character-access.js +41 -0
- package/dist/internal/planning/character-access.js.map +1 -0
- package/dist/internal/planning/character-registration-guard.d.ts.map +1 -1
- package/dist/internal/planning/character-registration-guard.js +2 -1
- package/dist/internal/planning/character-registration-guard.js.map +1 -1
- package/dist/internal/planning/character-registration.d.ts.map +1 -1
- package/dist/internal/planning/character-registration.js +2 -1
- package/dist/internal/planning/character-registration.js.map +1 -1
- package/dist/internal/planning/claim-stake-storage-actions.d.ts +12 -0
- package/dist/internal/planning/claim-stake-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/claim-stake-storage-actions.js +63 -0
- package/dist/internal/planning/claim-stake-storage-actions.js.map +1 -0
- package/dist/internal/planning/combat-storage-actions.d.ts +9 -0
- package/dist/internal/planning/combat-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/combat-storage-actions.js +55 -0
- package/dist/internal/planning/combat-storage-actions.js.map +1 -0
- package/dist/internal/planning/crafting-storage-actions.d.ts +7 -0
- package/dist/internal/planning/crafting-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/crafting-storage-actions.js +64 -0
- package/dist/internal/planning/crafting-storage-actions.js.map +1 -0
- package/dist/internal/planning/currency-cache-guard.d.ts +3 -1
- package/dist/internal/planning/currency-cache-guard.d.ts.map +1 -1
- package/dist/internal/planning/currency-cache-guard.js +47 -2
- package/dist/internal/planning/currency-cache-guard.js.map +1 -1
- package/dist/internal/planning/democracy-history.d.ts.map +1 -1
- package/dist/internal/planning/democracy-history.js +6 -15
- package/dist/internal/planning/democracy-history.js.map +1 -1
- package/dist/internal/planning/direct-options.d.ts +17 -0
- package/dist/internal/planning/direct-options.d.ts.map +1 -0
- package/dist/internal/planning/direct-options.js +43 -0
- package/dist/internal/planning/direct-options.js.map +1 -0
- package/dist/internal/planning/disband-storage-actions.d.ts +9 -0
- package/dist/internal/planning/disband-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/disband-storage-actions.js +24 -0
- package/dist/internal/planning/disband-storage-actions.js.map +1 -0
- package/dist/internal/planning/faction-enrollment.d.ts +0 -2
- package/dist/internal/planning/faction-enrollment.d.ts.map +1 -1
- package/dist/internal/planning/faction-enrollment.js +0 -9
- package/dist/internal/planning/faction-enrollment.js.map +1 -1
- package/dist/internal/planning/fleet-arrival.d.ts.map +1 -1
- package/dist/internal/planning/fleet-arrival.js +10 -8
- package/dist/internal/planning/fleet-arrival.js.map +1 -1
- package/dist/internal/planning/fleet-attack-xp.d.ts.map +1 -1
- package/dist/internal/planning/fleet-attack-xp.js +5 -11
- package/dist/internal/planning/fleet-attack-xp.js.map +1 -1
- package/dist/internal/planning/fleet-creation.d.ts.map +1 -1
- package/dist/internal/planning/fleet-creation.js +17 -36
- package/dist/internal/planning/fleet-creation.js.map +1 -1
- package/dist/internal/planning/fleet-crew-guard.d.ts +2 -1
- package/dist/internal/planning/fleet-crew-guard.d.ts.map +1 -1
- package/dist/internal/planning/fleet-crew-guard.js +2 -1
- package/dist/internal/planning/fleet-crew-guard.js.map +1 -1
- package/dist/internal/planning/fleet-crew-transfer.d.ts +1 -1
- package/dist/internal/planning/fleet-crew-transfer.d.ts.map +1 -1
- package/dist/internal/planning/fleet-crew-transfer.js +45 -24
- package/dist/internal/planning/fleet-crew-transfer.js.map +1 -1
- package/dist/internal/planning/fleet-disband-guard.d.ts +12 -0
- package/dist/internal/planning/fleet-disband-guard.d.ts.map +1 -0
- package/dist/internal/planning/fleet-disband-guard.js +54 -0
- package/dist/internal/planning/fleet-disband-guard.js.map +1 -0
- package/dist/internal/planning/fleet-disband.d.ts +36 -0
- package/dist/internal/planning/fleet-disband.d.ts.map +1 -0
- package/dist/internal/planning/fleet-disband.js +82 -0
- package/dist/internal/planning/fleet-disband.js.map +1 -0
- package/dist/internal/planning/fleet-dock-funding-guard.d.ts +3 -3
- package/dist/internal/planning/fleet-dock-funding-guard.d.ts.map +1 -1
- package/dist/internal/planning/fleet-dock-funding-guard.js +87 -96
- package/dist/internal/planning/fleet-dock-funding-guard.js.map +1 -1
- package/dist/internal/planning/fleet-dock-funding.d.ts.map +1 -1
- package/dist/internal/planning/fleet-dock-funding.js +10 -0
- package/dist/internal/planning/fleet-dock-funding.js.map +1 -1
- package/dist/internal/planning/fleet-docking-guard.d.ts.map +1 -1
- package/dist/internal/planning/fleet-docking-guard.js +3 -1
- package/dist/internal/planning/fleet-docking-guard.js.map +1 -1
- package/dist/internal/planning/fleet-docking.d.ts +17 -2
- package/dist/internal/planning/fleet-docking.d.ts.map +1 -1
- package/dist/internal/planning/fleet-docking.js +83 -62
- package/dist/internal/planning/fleet-docking.js.map +1 -1
- package/dist/internal/planning/fleet-rental.d.ts +5 -0
- package/dist/internal/planning/fleet-rental.d.ts.map +1 -0
- package/dist/internal/planning/fleet-rental.js +9 -0
- package/dist/internal/planning/fleet-rental.js.map +1 -0
- package/dist/internal/planning/fleet-respawn.d.ts.map +1 -1
- package/dist/internal/planning/fleet-respawn.js +10 -12
- package/dist/internal/planning/fleet-respawn.js.map +1 -1
- package/dist/internal/planning/fleet-ship-assembly.d.ts +2 -0
- package/dist/internal/planning/fleet-ship-assembly.d.ts.map +1 -1
- package/dist/internal/planning/fleet-ship-assembly.js +94 -64
- package/dist/internal/planning/fleet-ship-assembly.js.map +1 -1
- package/dist/internal/planning/fleet-state.d.ts +25 -0
- package/dist/internal/planning/fleet-state.d.ts.map +1 -0
- package/dist/internal/planning/fleet-state.js +28 -0
- package/dist/internal/planning/fleet-state.js.map +1 -0
- package/dist/internal/planning/governance-fees.d.ts.map +1 -1
- package/dist/internal/planning/governance-fees.js +7 -15
- package/dist/internal/planning/governance-fees.js.map +1 -1
- package/dist/internal/planning/local-market-order-funding.d.ts.map +1 -1
- package/dist/internal/planning/local-market-order-funding.js +4 -2
- package/dist/internal/planning/local-market-order-funding.js.map +1 -1
- package/dist/internal/planning/local-market-order.d.ts +4 -4
- package/dist/internal/planning/local-market-order.d.ts.map +1 -1
- package/dist/internal/planning/local-market-order.js +82 -109
- package/dist/internal/planning/local-market-order.js.map +1 -1
- package/dist/internal/planning/market-storage-actions.d.ts +7 -0
- package/dist/internal/planning/market-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/market-storage-actions.js +71 -0
- package/dist/internal/planning/market-storage-actions.js.map +1 -0
- package/dist/internal/planning/mining-stop.d.ts.map +1 -1
- package/dist/internal/planning/mining-stop.js +2 -1
- package/dist/internal/planning/mining-stop.js.map +1 -1
- package/dist/internal/planning/mining-storage-actions.d.ts +11 -0
- package/dist/internal/planning/mining-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/mining-storage-actions.js +57 -0
- package/dist/internal/planning/mining-storage-actions.js.map +1 -0
- package/dist/internal/planning/movement-storage-actions.d.ts +7 -0
- package/dist/internal/planning/movement-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/movement-storage-actions.js +38 -0
- package/dist/internal/planning/movement-storage-actions.js.map +1 -0
- package/dist/internal/planning/movement-xp-guard.d.ts.map +1 -1
- package/dist/internal/planning/movement-xp-guard.js +3 -2
- package/dist/internal/planning/movement-xp-guard.js.map +1 -1
- package/dist/internal/planning/open-signal-guard.d.ts.map +1 -1
- package/dist/internal/planning/open-signal-guard.js +2 -1
- package/dist/internal/planning/open-signal-guard.js.map +1 -1
- package/dist/internal/planning/open-signal.d.ts.map +1 -1
- package/dist/internal/planning/open-signal.js +16 -7
- package/dist/internal/planning/open-signal.js.map +1 -1
- package/dist/internal/planning/original-token.d.ts +40 -0
- package/dist/internal/planning/original-token.d.ts.map +1 -0
- package/dist/internal/planning/original-token.js +112 -0
- package/dist/internal/planning/original-token.js.map +1 -0
- package/dist/internal/planning/own-starbase-facts.d.ts +37 -0
- package/dist/internal/planning/own-starbase-facts.d.ts.map +1 -0
- package/dist/internal/planning/own-starbase-facts.js +52 -0
- package/dist/internal/planning/own-starbase-facts.js.map +1 -0
- package/dist/internal/planning/plan-fields.d.ts +60 -0
- package/dist/internal/planning/plan-fields.d.ts.map +1 -0
- package/dist/internal/planning/plan-fields.js +159 -0
- package/dist/internal/planning/plan-fields.js.map +1 -0
- package/dist/internal/planning/plan-guards.d.ts +4 -0
- package/dist/internal/planning/plan-guards.d.ts.map +1 -0
- package/dist/internal/planning/plan-guards.js +184 -0
- package/dist/internal/planning/plan-guards.js.map +1 -0
- package/dist/internal/planning/profile-key.d.ts +13 -0
- package/dist/internal/planning/profile-key.d.ts.map +1 -0
- package/dist/internal/planning/profile-key.js +20 -0
- package/dist/internal/planning/profile-key.js.map +1 -0
- package/dist/internal/planning/profile-storage-funding-guard.d.ts +29 -0
- package/dist/internal/planning/profile-storage-funding-guard.d.ts.map +1 -0
- package/dist/internal/planning/profile-storage-funding-guard.js +115 -0
- package/dist/internal/planning/profile-storage-funding-guard.js.map +1 -0
- package/dist/internal/planning/profile-storage-funding.d.ts +46 -0
- package/dist/internal/planning/profile-storage-funding.d.ts.map +1 -0
- package/dist/internal/planning/profile-storage-funding.js +58 -0
- package/dist/internal/planning/profile-storage-funding.js.map +1 -0
- package/dist/internal/planning/recipe-state.d.ts +4 -1
- package/dist/internal/planning/recipe-state.d.ts.map +1 -1
- package/dist/internal/planning/recipe-state.js +7 -4
- package/dist/internal/planning/recipe-state.js.map +1 -1
- package/dist/internal/planning/region-access.d.ts +30 -0
- package/dist/internal/planning/region-access.d.ts.map +1 -0
- package/dist/internal/planning/region-access.js +94 -0
- package/dist/internal/planning/region-access.js.map +1 -0
- package/dist/internal/planning/rent-catalog.d.ts +37 -0
- package/dist/internal/planning/rent-catalog.d.ts.map +1 -0
- package/dist/internal/planning/rent-catalog.js +165 -0
- package/dist/internal/planning/rent-catalog.js.map +1 -0
- package/dist/internal/planning/research-unlock.d.ts +69 -0
- package/dist/internal/planning/research-unlock.d.ts.map +1 -0
- package/dist/internal/planning/research-unlock.js +287 -0
- package/dist/internal/planning/research-unlock.js.map +1 -0
- package/dist/internal/planning/respawn-guards.js +2 -1
- package/dist/internal/planning/respawn-guards.js.map +1 -1
- package/dist/internal/planning/runtime-guards.d.ts +0 -2
- package/dist/internal/planning/runtime-guards.d.ts.map +1 -1
- package/dist/internal/planning/runtime-guards.js +49 -29
- package/dist/internal/planning/runtime-guards.js.map +1 -1
- package/dist/internal/planning/scan-completion-guard.d.ts +6 -6
- package/dist/internal/planning/scan-completion-guard.d.ts.map +1 -1
- package/dist/internal/planning/scan-completion-guard.js +8 -7
- package/dist/internal/planning/scan-completion-guard.js.map +1 -1
- package/dist/internal/planning/scan-completion.d.ts.map +1 -1
- package/dist/internal/planning/scan-completion.js +9 -7
- package/dist/internal/planning/scan-completion.js.map +1 -1
- package/dist/internal/planning/scan-detect-guard.d.ts +1 -1
- package/dist/internal/planning/scan-detect-guard.d.ts.map +1 -1
- package/dist/internal/planning/scan-detect-guard.js +2 -2
- package/dist/internal/planning/scan-detect-guard.js.map +1 -1
- package/dist/internal/planning/scan-detect.d.ts +1 -1
- package/dist/internal/planning/scan-detect.d.ts.map +1 -1
- package/dist/internal/planning/scan-detect.js +10 -8
- package/dist/internal/planning/scan-detect.js.map +1 -1
- package/dist/internal/planning/scan-idle-scope.d.ts +5 -0
- package/dist/internal/planning/scan-idle-scope.d.ts.map +1 -0
- package/dist/internal/planning/scan-idle-scope.js +5 -0
- package/dist/internal/planning/scan-idle-scope.js.map +1 -0
- package/dist/internal/planning/scan-storage-actions.d.ts +9 -0
- package/dist/internal/planning/scan-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/scan-storage-actions.js +27 -0
- package/dist/internal/planning/scan-storage-actions.js.map +1 -0
- package/dist/internal/planning/ship-import-funding.js +3 -2
- package/dist/internal/planning/ship-import-funding.js.map +1 -1
- package/dist/internal/planning/ship-token.d.ts +1 -5
- package/dist/internal/planning/ship-token.d.ts.map +1 -1
- package/dist/internal/planning/ship-token.js +0 -36
- package/dist/internal/planning/ship-token.js.map +1 -1
- package/dist/internal/planning/starbase-player-owner.d.ts +21 -0
- package/dist/internal/planning/starbase-player-owner.d.ts.map +1 -0
- package/dist/internal/planning/starbase-player-owner.js +17 -0
- package/dist/internal/planning/starbase-player-owner.js.map +1 -0
- package/dist/internal/planning/starbase-player-recovery-guard.d.ts +7 -0
- package/dist/internal/planning/starbase-player-recovery-guard.d.ts.map +1 -0
- package/dist/internal/planning/starbase-player-recovery-guard.js +39 -0
- package/dist/internal/planning/starbase-player-recovery-guard.js.map +1 -0
- package/dist/internal/planning/starbase-system-guard.d.ts.map +1 -1
- package/dist/internal/planning/starbase-system-guard.js +2 -1
- package/dist/internal/planning/starbase-system-guard.js.map +1 -1
- package/dist/internal/planning/starbase-system.d.ts +5 -2
- package/dist/internal/planning/starbase-system.d.ts.map +1 -1
- package/dist/internal/planning/starbase-system.js +6 -3
- package/dist/internal/planning/starbase-system.js.map +1 -1
- package/dist/internal/planning/storage-action-readers.d.ts +10 -0
- package/dist/internal/planning/storage-action-readers.d.ts.map +1 -0
- package/dist/internal/planning/storage-action-readers.js +58 -0
- package/dist/internal/planning/storage-action-readers.js.map +1 -0
- package/dist/internal/planning/storage-actions.d.ts +89 -0
- package/dist/internal/planning/storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/storage-actions.js +183 -0
- package/dist/internal/planning/storage-actions.js.map +1 -0
- package/dist/internal/planning/token-mint.d.ts.map +1 -1
- package/dist/internal/planning/token-mint.js +2 -1
- package/dist/internal/planning/token-mint.js.map +1 -1
- package/dist/internal/planning/wallet-starbase.d.ts +34 -0
- package/dist/internal/planning/wallet-starbase.d.ts.map +1 -0
- package/dist/internal/planning/wallet-starbase.js +39 -0
- package/dist/internal/planning/wallet-starbase.js.map +1 -0
- package/dist/internal/planning/xp-runtime.d.ts.map +1 -1
- package/dist/internal/planning/xp-runtime.js +16 -20
- package/dist/internal/planning/xp-runtime.js.map +1 -1
- package/dist/internal/read-meta.d.ts +12 -0
- package/dist/internal/read-meta.d.ts.map +1 -1
- package/dist/internal/read-meta.js +10 -0
- package/dist/internal/read-meta.js.map +1 -1
- package/dist/loyalty/actions/index.d.ts +1 -1
- package/dist/loyalty/actions/index.d.ts.map +1 -1
- package/dist/loyalty/actions/index.js +12 -43
- package/dist/loyalty/actions/index.js.map +1 -1
- package/dist/loyalty/index.d.ts +4 -0
- package/dist/loyalty/index.d.ts.map +1 -1
- package/dist/loyalty/index.js +19 -27
- package/dist/loyalty/index.js.map +1 -1
- package/dist/markets/actions/index.d.ts +1 -1
- package/dist/markets/actions/index.d.ts.map +1 -1
- package/dist/markets/actions/index.js +138 -176
- package/dist/markets/actions/index.js.map +1 -1
- package/dist/markets/actions/trade-faction-market.d.ts +4 -2
- package/dist/markets/actions/trade-faction-market.d.ts.map +1 -1
- package/dist/markets/actions/trade-faction-market.js +59 -39
- package/dist/markets/actions/trade-faction-market.js.map +1 -1
- package/dist/markets/index.d.ts.map +1 -1
- package/dist/markets/index.js +3 -11
- package/dist/markets/index.js.map +1 -1
- package/dist/mining/actions/index.d.ts +1 -1
- package/dist/mining/actions/index.d.ts.map +1 -1
- package/dist/mining/actions/index.js +81 -44
- package/dist/mining/actions/index.js.map +1 -1
- package/dist/mining/estimate-input.d.ts +103 -0
- package/dist/mining/estimate-input.d.ts.map +1 -0
- package/dist/mining/estimate-input.js +86 -0
- package/dist/mining/estimate-input.js.map +1 -0
- package/dist/mining/index.d.ts +1 -0
- package/dist/mining/index.d.ts.map +1 -1
- package/dist/mining/index.js +4 -11
- package/dist/mining/index.js.map +1 -1
- package/dist/planning/assembly.d.ts +1 -1
- package/dist/planning/assembly.d.ts.map +1 -1
- package/dist/planning/assembly.js +6 -30
- package/dist/planning/assembly.js.map +1 -1
- package/dist/planning/execution.d.ts +1 -0
- package/dist/planning/execution.d.ts.map +1 -1
- package/dist/planning/execution.js +149 -45
- package/dist/planning/execution.js.map +1 -1
- package/dist/planning/index.d.ts +70 -7
- package/dist/planning/index.d.ts.map +1 -1
- package/dist/planning/index.js +28 -1141
- package/dist/planning/index.js.map +1 -1
- package/dist/planning/plan-construction.d.ts +25 -0
- package/dist/planning/plan-construction.d.ts.map +1 -0
- package/dist/planning/plan-construction.js +143 -0
- package/dist/planning/plan-construction.js.map +1 -0
- package/dist/planning/plan-sequence-execution.d.ts.map +1 -1
- package/dist/planning/plan-sequence-execution.js +1 -11
- package/dist/planning/plan-sequence-execution.js.map +1 -1
- package/dist/planning/plan-validation.d.ts +17 -0
- package/dist/planning/plan-validation.d.ts.map +1 -0
- package/dist/planning/plan-validation.js +147 -0
- package/dist/planning/plan-validation.js.map +1 -0
- package/dist/registry/cargo.d.ts +2 -2
- package/dist/registry/cargo.d.ts.map +1 -1
- package/dist/registry/cargo.js +3 -4
- package/dist/registry/cargo.js.map +1 -1
- package/dist/registry/definition-section-snapshot.d.ts +1 -1
- package/dist/registry/definition-section-snapshot.d.ts.map +1 -1
- package/dist/registry/definition-section-snapshot.js +10 -3
- package/dist/registry/definition-section-snapshot.js.map +1 -1
- package/dist/registry/index.d.ts +31 -4
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +226 -227
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/onboarding.d.ts.map +1 -1
- package/dist/registry/onboarding.js +4 -2
- package/dist/registry/onboarding.js.map +1 -1
- package/dist/registry/ship-stats-snapshot.d.ts.map +1 -1
- package/dist/registry/ship-stats-snapshot.js +19 -5
- package/dist/registry/ship-stats-snapshot.js.map +1 -1
- package/dist/registry/ships.js +1 -1
- package/dist/registry/ships.js.map +1 -1
- package/dist/rewards/index.d.ts +11 -5
- package/dist/rewards/index.d.ts.map +1 -1
- package/dist/rewards/index.js +10 -21
- package/dist/rewards/index.js.map +1 -1
- package/dist/scanning/actions/index.d.ts +1 -1
- package/dist/scanning/actions/index.d.ts.map +1 -1
- package/dist/scanning/actions/index.js +38 -8
- package/dist/scanning/actions/index.js.map +1 -1
- package/dist/scanning/index.d.ts +6 -11
- package/dist/scanning/index.d.ts.map +1 -1
- package/dist/scanning/index.js +7 -15
- package/dist/scanning/index.js.map +1 -1
- package/dist/scanning/odds.d.ts +5 -1
- package/dist/scanning/odds.d.ts.map +1 -1
- package/dist/scanning/odds.js.map +1 -1
- package/dist/scanning/signals.d.ts +6 -1
- package/dist/scanning/signals.d.ts.map +1 -1
- package/dist/scanning/signals.js +3 -1
- package/dist/scanning/signals.js.map +1 -1
- package/dist/starbases/actions/index.d.ts +49 -4
- package/dist/starbases/actions/index.d.ts.map +1 -1
- package/dist/starbases/actions/index.js +120 -69
- package/dist/starbases/actions/index.js.map +1 -1
- package/dist/starbases/index.d.ts +18 -0
- package/dist/starbases/index.d.ts.map +1 -1
- package/dist/starbases/index.js +24 -11
- package/dist/starbases/index.js.map +1 -1
- package/dist/world/index.d.ts +87 -13
- package/dist/world/index.d.ts.map +1 -1
- package/dist/world/index.js +88 -22
- package/dist/world/index.js.map +1 -1
- package/dist/world/planet-claim-stake-plots.d.ts +49 -40
- package/dist/world/planet-claim-stake-plots.d.ts.map +1 -1
- package/dist/world/planet-claim-stake-plots.js +47 -40
- package/dist/world/planet-claim-stake-plots.js.map +1 -1
- package/dist/world/starbase-status.d.ts +54 -13
- package/dist/world/starbase-status.d.ts.map +1 -1
- package/dist/world/starbase-status.js +65 -0
- package/dist/world/starbase-status.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/c4/faction-adapter.d.ts +0 -12
- package/dist/internal/c4/faction-adapter.d.ts.map +0 -1
- package/dist/internal/c4/faction-adapter.js +0 -52
- package/dist/internal/c4/faction-adapter.js.map +0 -1
- package/dist/internal/planning/movement-character.d.ts +0 -7
- package/dist/internal/planning/movement-character.d.ts.map +0 -1
- package/dist/internal/planning/movement-character.js +0 -41
- package/dist/internal/planning/movement-character.js.map +0 -1
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import { fleetAttackInstructionKey, validateFleetAttackActors, } from '../../internal/planning/fleet-attack-xp.js';
|
|
2
2
|
import { resolveXpRuntime } from '../../internal/planning/xp-runtime.js';
|
|
3
|
-
import {
|
|
3
|
+
import { hashRegionAccess, regionsContainingSystem, } from '../../internal/planning/region-access.js';
|
|
4
|
+
import { isAddress } from '@solana/kit';
|
|
5
|
+
import { requireDisabledLevelRent } from '../../internal/planning/rent-catalog.js';
|
|
4
6
|
import { resolveActionRuntime } from '../../internal/planning/action-runtime.js';
|
|
5
7
|
import { InvalidActionInputError, SageSdkError } from '../../client/errors.js';
|
|
6
8
|
import { readContextRawAccounts } from '../../client/reconciliation.js';
|
|
7
9
|
import { getRetrieveLootInstructionDataEncoder } from '../../internal/c4/runtime-bindings.js';
|
|
8
|
-
import { lootAccountDefinition, } from '../../internal/c4/
|
|
10
|
+
import { lootAccountDefinition, } from '../../internal/c4/loot.js';
|
|
9
11
|
import { deriveFleetAddress, fleetAccountDefinition, } from '../../internal/c4/fleet.js';
|
|
10
12
|
import { deriveFleetCrewBindingAddress, fleetCrewBindingAccountDefinition, matchesFleetCrewBindingIdentity, } from '../../internal/c4/fleet-crew-binding.js';
|
|
11
13
|
import { deriveFactionAccountAddress, deriveFactionEconomicsConfigAddress, deriveFactionOwnershipAddress, deriveFactionRelationTrackerAddress, deriveFactionTreasuryAddress, deriveKingSystemTrackerAddress, deriveRegionTrackerAddress, factionAccountDefinition, factionEconomicsConfigAccountDefinition, factionOwnershipAccountDefinition, factionRelationTrackerAccountDefinition, factionTreasuryAccountDefinition, kingSystemTrackerAccountDefinition, regionTrackerAccountDefinition, } from '../../internal/c4/factions.js';
|
|
12
|
-
import {
|
|
14
|
+
import { factionValue } from '../../internal/c4/faction.js';
|
|
15
|
+
import { characterAccountDefinition, findCharacterPda, } from '../../internal/c4/character.js';
|
|
13
16
|
import { deriveLoyaltyContributionAddress, deriveLoyaltyEpochAddress, loyaltyContributionAccountDefinition, loyaltyEpochAccountDefinition, } from '../../internal/c4/loyalty.js';
|
|
14
17
|
import { atlasRewardConfigAccountDefinition, atlasRewardRegistryAccountDefinition, deriveAtlasRewardConfigAddress, deriveAtlasRewardRegistryAddress, } from '../../internal/c4/rewards.js';
|
|
15
18
|
import { deriveStarSystemAddress, starSystemAccountDefinition, } from '../../internal/c4/world.js';
|
|
16
19
|
import { requireGameAddress } from '../../internal/game-context.js';
|
|
17
|
-
import { adaptApplyCombatStimulantInstruction, adaptAttackFleetInstruction, adaptAttackStarbaseInstruction, adaptRetrieveLootInstruction,
|
|
18
|
-
import {
|
|
20
|
+
import { adaptApplyCombatStimulantInstruction, adaptAttackFleetInstruction, adaptAttackStarbaseInstruction, adaptRetrieveLootInstruction, readPlanAuthorization, } from '../../internal/planning/authorization-adapter.js';
|
|
21
|
+
import { buildPlannerPlan } from '../../planning/plan-construction.js';
|
|
19
22
|
import { readGameCombatConfiguration } from '../../registry/combat.js';
|
|
23
|
+
import { CLOCK_ADDRESS, readClock, } from '../../internal/planning/faction-enrollment.js';
|
|
20
24
|
import { resolveCargo, } from '../../registry/index.js';
|
|
25
|
+
import { accountAbsentPrecondition, accountStatePrecondition, } from '../../internal/planning/account-state.js';
|
|
26
|
+
import { stimulantStatId } from '../../internal/c4/stimulant.js';
|
|
27
|
+
import { readCombatStorageAction } from '../../internal/planning/combat-storage-actions.js';
|
|
28
|
+
import { RENT_ADDRESS } from '../../internal/planning/rent.js';
|
|
29
|
+
import { planStorageFunding } from '../../internal/planning/storage-actions.js';
|
|
21
30
|
function invalid(field, value, acceptedRange, remedy) {
|
|
22
31
|
throw new InvalidActionInputError(field, value, acceptedRange, remedy);
|
|
23
32
|
}
|
|
@@ -38,19 +47,13 @@ function assertKeys(value, field, required, optional = []) {
|
|
|
38
47
|
function validateOptions(value) {
|
|
39
48
|
const options = readRecord(value, 'options');
|
|
40
49
|
assertKeys(options, 'options', ['authorization']);
|
|
41
|
-
const
|
|
42
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
43
|
-
const authorization = authorizationRecord;
|
|
44
|
-
validatePlanAuthorization(authorization);
|
|
50
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
45
51
|
return { authorization };
|
|
46
52
|
}
|
|
47
53
|
function validateAttackOptions(value) {
|
|
48
54
|
const options = readRecord(value, 'options');
|
|
49
55
|
assertKeys(options, 'options', ['authorization', 'loot']);
|
|
50
|
-
const
|
|
51
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
52
|
-
const authorization = authorizationRecord;
|
|
53
|
-
validatePlanAuthorization(authorization);
|
|
56
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
54
57
|
if (typeof options.loot !== 'string' || !isAddress(options.loot)) {
|
|
55
58
|
invalid('options.loot', options.loot, 'one valid new Loot account address', 'Generate a new address-only Loot signer and provide its public address before retrying.');
|
|
56
59
|
}
|
|
@@ -69,10 +72,7 @@ function validateAttackStance(value) {
|
|
|
69
72
|
function validateRetrieveOptions(value) {
|
|
70
73
|
const options = readRecord(value, 'options');
|
|
71
74
|
assertKeys(options, 'options', ['authorization', 'atUnixSeconds']);
|
|
72
|
-
const
|
|
73
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
74
|
-
const authorization = authorizationRecord;
|
|
75
|
-
validatePlanAuthorization(authorization);
|
|
75
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
76
76
|
if (typeof options.atUnixSeconds !== 'bigint' || options.atUnixSeconds < 0n) {
|
|
77
77
|
invalid('options.atUnixSeconds', options.atUnixSeconds, 'a non-negative bigint Unix timestamp', 'Provide the explicit current Unix timestamp used to evaluate Loot exclusivity before retrying.');
|
|
78
78
|
}
|
|
@@ -122,13 +122,21 @@ function validateLootSelection(value, loot, fleet, retrievingProfile, atUnixSeco
|
|
|
122
122
|
if (item === undefined) {
|
|
123
123
|
invalid(`${field}.itemIndex`, itemIndex, `an available Loot item index below ${String(loot.items.length)}`, 'Refresh the Loot snapshot and select an existing item before retrying.');
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
// The retriever is the Fleet's controlling Profile. Reward cargo stays
|
|
126
|
+
// locked to the destroying Profile until it expires and is swept; ordinary
|
|
127
|
+
// cargo is exclusive to the destroying Profile only until the unlock time.
|
|
128
|
+
const destroyer = item.destroyer?.address;
|
|
129
|
+
if (item.rewardReclaimAtUnixSeconds > 0n) {
|
|
130
|
+
if (destroyer !== retrievingProfile) {
|
|
131
|
+
fail(`Loot item ${String(itemIndex)} is reward cargo locked to ${destroyer === undefined ? 'no destroying Profile' : `destroying Profile ${destroyer}`}, not Profile ${retrievingProfile}. Reward cargo never opens to other Profiles; it is swept after ${String(item.rewardReclaimAtUnixSeconds)} Unix seconds. Choose another item or use the destroying Profile's Fleet before retrying.`, loot.address);
|
|
132
|
+
}
|
|
133
|
+
if (atUnixSeconds > item.rewardReclaimAtUnixSeconds) {
|
|
134
|
+
fail(`Loot item ${String(itemIndex)} reward cargo expired at ${String(item.rewardReclaimAtUnixSeconds)} Unix seconds and is swept to the reward treasury, not retrievable at ${String(atUnixSeconds)}. Choose another item or refresh the Loot before retrying.`, loot.address);
|
|
135
|
+
}
|
|
128
136
|
}
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
fail(`Loot item ${String(itemIndex)}
|
|
137
|
+
else if (atUnixSeconds < item.exclusivityUnlockAtUnixSeconds &&
|
|
138
|
+
destroyer !== retrievingProfile) {
|
|
139
|
+
fail(`Loot item ${String(itemIndex)} is exclusive to ${destroyer === undefined ? 'no Profile (a Starbase kill)' : `destroying Profile ${destroyer}`} until ${String(item.exclusivityUnlockAtUnixSeconds)} Unix seconds, not Profile ${retrievingProfile}. Use the destroying Profile's Fleet or wait for the exclusivity window to pass before retrying.`, loot.address);
|
|
132
140
|
}
|
|
133
141
|
const cargoRequests = denseArray(target.cargo, `${field}.cargo`);
|
|
134
142
|
if (cargoRequests.length === 0 || cargoRequests.length > 65_536) {
|
|
@@ -185,7 +193,7 @@ function requireAccount(account, address, message) {
|
|
|
185
193
|
}
|
|
186
194
|
function stimulantFingerprint(stimulant) {
|
|
187
195
|
const effects = stimulant.effects
|
|
188
|
-
.map(({ charges, deltaBps,
|
|
196
|
+
.map(({ charges, deltaBps, stackRule, stat }) => `${String(charges)}:${String(deltaBps)}:${stackRule}:${stat}`)
|
|
189
197
|
.join(',');
|
|
190
198
|
return [
|
|
191
199
|
stimulant.cargo.id,
|
|
@@ -210,35 +218,14 @@ function rawCargoFingerprint(fleet) {
|
|
|
210
218
|
.join(',');
|
|
211
219
|
return [fleet.cargoHold.seqId, fleet.cargoHold.storageCost, items].join('|');
|
|
212
220
|
}
|
|
213
|
-
async function hashAccountState(account) {
|
|
214
|
-
const owner = getAddressEncoder().encode(account.owner);
|
|
215
|
-
const canonical = new Uint8Array(owner.length + account.data.length);
|
|
216
|
-
canonical.set(owner);
|
|
217
|
-
canonical.set(account.data, owner.length);
|
|
218
|
-
const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', canonical));
|
|
219
|
-
return [...digest].map((byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
220
|
-
}
|
|
221
|
-
async function precondition(account, describes) {
|
|
222
|
-
return Object.freeze({
|
|
223
|
-
address: account.address,
|
|
224
|
-
dataHash: await hashAccountState(account),
|
|
225
|
-
describes,
|
|
226
|
-
kind: 'account-state',
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function absentPrecondition(address, describes) {
|
|
230
|
-
return Object.freeze({
|
|
231
|
-
address,
|
|
232
|
-
describes,
|
|
233
|
-
kind: 'account-absent',
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
221
|
/** Plans application of one configured combat stimulant without predicting its effects.
|
|
237
222
|
*
|
|
238
223
|
* The planner validates Fleet ownership and Game membership, current catalog
|
|
239
|
-
* membership, known cargo balance, crewed
|
|
240
|
-
* whole-account Fleet state.
|
|
241
|
-
*
|
|
224
|
+
* membership, known cargo balance, a crewed Fleet that is neither destroyed
|
|
225
|
+
* nor respawning, and fresh whole-account Fleet state. Only stimulants whose
|
|
226
|
+
* effects use the `refresh` stack rule are planned, as the game applies no
|
|
227
|
+
* other rule yet. Permission, charge application, and combat arithmetic remain
|
|
228
|
+
* chain-authoritative.
|
|
242
229
|
*
|
|
243
230
|
* @example
|
|
244
231
|
* ```ts
|
|
@@ -264,8 +251,13 @@ export async function planFleetApplyCombatStimulant(ctx, fleet, stimulant, input
|
|
|
264
251
|
if (fleet.game !== game) {
|
|
265
252
|
fail(`Fleet ${fleet.address} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
266
253
|
}
|
|
267
|
-
if (fleet.state.kind === 'destroyed') {
|
|
268
|
-
fail(`Fleet ${fleet.name} (${fleet.address}) is
|
|
254
|
+
if (fleet.state.kind === 'destroyed' || fleet.state.kind === 'respawn') {
|
|
255
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) is ${fleet.state.kind} and cannot apply a combat stimulant. Wait until it is back at a Starbase, refresh it, and retry.`, fleet.address);
|
|
256
|
+
}
|
|
257
|
+
// The game applies only refresh-rule effects and refuses the others.
|
|
258
|
+
const unsupported = stimulant.effects.find(({ stackRule }) => stackRule !== 'refresh');
|
|
259
|
+
if (unsupported !== undefined) {
|
|
260
|
+
fail(`Stimulant ${stimulant.cargo.name} has a ${unsupported.stackRule} effect on ${unsupported.stat}; the game applies only refresh effects. Choose another stimulant.`, fleet.address);
|
|
269
261
|
}
|
|
270
262
|
const combat = await readGameCombatConfiguration(ctx);
|
|
271
263
|
const definitions = await Promise.all(combat.data.stimulantDefinitions.definitions.map(async (definition) => ({
|
|
@@ -311,41 +303,32 @@ export async function planFleetApplyCombatStimulant(ctx, fleet, stimulant, input
|
|
|
311
303
|
if (current.crewCount <= 0) {
|
|
312
304
|
fail(`Fleet ${fleet.name} (${fleet.address}) has no crew and cannot apply a combat stimulant. Crew the Fleet, refresh it through this context, and retry.`, fleet.address);
|
|
313
305
|
}
|
|
314
|
-
const
|
|
315
|
-
|
|
306
|
+
const instruction = adaptApplyCombatStimulantInstruction({
|
|
307
|
+
authorization: options.authorization,
|
|
308
|
+
fleet: fleet.address,
|
|
309
|
+
game,
|
|
310
|
+
stimCargoId: catalogued.cargo.id,
|
|
311
|
+
});
|
|
312
|
+
// A stimulant for a stat without an entry grows the Fleet; the program funds
|
|
313
|
+
// that from the Profile vault with the signing key.
|
|
314
|
+
const storage = await planFleetStorage(ctx, instruction, [account.address], options.authorization.profile, 'combat stimulant', catalogued.effects.map(({ stat }) => stimulantStatId(stat)));
|
|
315
|
+
const description = `Apply one ${catalogued.cargo.name} combat stimulant from Fleet ${fleet.name} (${fleet.address}); permission, stacking, charge application, and combat outcomes remain chain-authoritative. ${storage.disclosure}`;
|
|
316
|
+
return buildPlannerPlan({
|
|
316
317
|
kind: 'combat.apply-stimulant',
|
|
317
318
|
preconditions: [
|
|
318
|
-
await
|
|
319
|
+
await accountStatePrecondition(account, `Fleet ${fleet.name} retains its configured Game, owning Profile, supported crewed state, and known ${catalogued.cargo.name} cargo balance.`),
|
|
320
|
+
storage.guard,
|
|
319
321
|
],
|
|
320
322
|
steps: [
|
|
321
323
|
{
|
|
322
324
|
describes: description,
|
|
323
|
-
instruction
|
|
324
|
-
authorization: options.authorization,
|
|
325
|
-
fleet: fleet.address,
|
|
326
|
-
game,
|
|
327
|
-
stimCargoId: catalogued.cargo.id,
|
|
328
|
-
}),
|
|
325
|
+
instruction,
|
|
329
326
|
signers: [options.authorization.authority],
|
|
330
327
|
},
|
|
331
328
|
],
|
|
332
329
|
summary: description,
|
|
333
330
|
});
|
|
334
331
|
}
|
|
335
|
-
function factionId(fleet) {
|
|
336
|
-
if (fleet.npcFactionId > 0)
|
|
337
|
-
return fleet.npcFactionId;
|
|
338
|
-
switch (fleet.faction) {
|
|
339
|
-
case 'mud':
|
|
340
|
-
return 1;
|
|
341
|
-
case 'oni':
|
|
342
|
-
return 2;
|
|
343
|
-
case 'ustur':
|
|
344
|
-
return 3;
|
|
345
|
-
case 'unaligned':
|
|
346
|
-
return 0;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
332
|
function shipFingerprint(fleet) {
|
|
350
333
|
return fleet.ships
|
|
351
334
|
.map(({ id, quantity }) => `${String(id)}:${String(quantity)}`)
|
|
@@ -401,6 +384,25 @@ async function validateCurrentAttackFleet(fleet, account) {
|
|
|
401
384
|
}
|
|
402
385
|
return currentAccount;
|
|
403
386
|
}
|
|
387
|
+
/** The program attacks only with an attacker that is Idle or subwarping at
|
|
388
|
+
* chain time (a finished warp counts as Idle), carries its required crew, and
|
|
389
|
+
* has usable AP: stored AP refills right after an attack, but stays unusable
|
|
390
|
+
* until the reload completes. */
|
|
391
|
+
function validateAttackerReadiness(fleet, account, clock) {
|
|
392
|
+
const now = readClock(requireAccount(clock, CLOCK_ADDRESS, 'The Clock sysvar is missing. Refresh chain time and retry the attack.'));
|
|
393
|
+
const current = fleetAccountDefinition.decode(account);
|
|
394
|
+
const label = `Attacking Fleet ${fleet.name} (${fleet.address})`;
|
|
395
|
+
const { state } = current;
|
|
396
|
+
if (state.kind !== 'idle' &&
|
|
397
|
+
state.kind !== 'subwarp' &&
|
|
398
|
+
!(state.kind === 'warp' && now >= state.arrivesAtUnixSeconds))
|
|
399
|
+
fail(`${label} is ${state.kind === 'warp' ? 'still warping' : state.kind}; only an Idle or subwarping Fleet can attack. Wait or move it into space, refresh the Fleet, and retry.`, fleet.address);
|
|
400
|
+
if (current.crewCount < current.stats.misc.requiredCrew)
|
|
401
|
+
fail(`${label} has ${String(current.crewCount)} crew but needs ${String(current.stats.misc.requiredCrew)} to attack. Load crew, refresh the Fleet, and retry.`, fleet.address);
|
|
402
|
+
// Zero stored AP is refused earlier, and the fresh account matches the snapshot.
|
|
403
|
+
if (now < current.apReloadExpiresAt)
|
|
404
|
+
fail(`${label} has no usable ability power at chain time ${String(now)}: stored AP ${String(current.ap)} with reload completing at ${String(current.apReloadExpiresAt)}. Wait for the reload, refresh the Fleet, and retry.`, fleet.address);
|
|
405
|
+
}
|
|
404
406
|
async function optionalCrewBinding(ctx, fleet) {
|
|
405
407
|
const address = await deriveFleetCrewBindingAddress(fleet.address);
|
|
406
408
|
const [envelope] = await ctx.data.readMany(fleetCrewBindingAccountDefinition, [address]);
|
|
@@ -411,7 +413,7 @@ async function optionalCrewBinding(ctx, fleet) {
|
|
|
411
413
|
return envelope?.address;
|
|
412
414
|
}
|
|
413
415
|
async function resolveRewardAccounts(ctx, fleet, registry, config, epochIndex) {
|
|
414
|
-
const resolvedFaction =
|
|
416
|
+
const resolvedFaction = fleet.npcFactionId > 0 ? fleet.npcFactionId : factionValue(fleet.faction);
|
|
415
417
|
if (resolvedFaction === 0)
|
|
416
418
|
return { config, registry };
|
|
417
419
|
const [epochAddress, contributionAddress] = await Promise.all([
|
|
@@ -446,35 +448,86 @@ async function resolveRewardAccounts(ctx, fleet, registry, config, epochIndex) {
|
|
|
446
448
|
registry,
|
|
447
449
|
};
|
|
448
450
|
}
|
|
449
|
-
|
|
451
|
+
/** Reads and requires an NPC Fleet's canonical FactionOwnership and, when
|
|
452
|
+
* `withFaction`, its Faction account; a player Fleet has neither. */
|
|
453
|
+
async function resolveNpcAccounts(ctx, fleet, withFaction) {
|
|
450
454
|
if (fleet.npcFactionId === 0)
|
|
451
455
|
return {};
|
|
452
|
-
const
|
|
453
|
-
|
|
456
|
+
const addresses = await Promise.all([
|
|
457
|
+
deriveFactionOwnershipAddress(fleet.game, 'fleet', fleet.address),
|
|
458
|
+
...(withFaction
|
|
459
|
+
? [deriveFactionAccountAddress(fleet.game, fleet.npcFactionId)]
|
|
460
|
+
: []),
|
|
461
|
+
]);
|
|
462
|
+
const [ownership, faction] = await readContextRawAccounts(ctx, addresses);
|
|
463
|
+
const ownershipData = ownership && factionOwnershipAccountDefinition.decode(ownership);
|
|
454
464
|
if (ownership === undefined ||
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
fail(`NPC Fleet ${fleet.address} has no matching canonical FactionOwnership for faction ${String(fleet.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`,
|
|
460
|
-
}
|
|
461
|
-
if (!
|
|
462
|
-
return { ownership
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
fail(`Faction ${
|
|
468
|
-
}
|
|
469
|
-
return {
|
|
465
|
+
ownershipData?.game !== fleet.game ||
|
|
466
|
+
ownershipData.asset.kind !== 'fleet' ||
|
|
467
|
+
ownershipData.asset.fleet !== fleet.address ||
|
|
468
|
+
ownershipData.controllingFactionId !== fleet.npcFactionId) {
|
|
469
|
+
fail(`NPC Fleet ${fleet.address} has no matching canonical FactionOwnership for faction ${String(fleet.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`, addresses[0]);
|
|
470
|
+
}
|
|
471
|
+
if (!withFaction)
|
|
472
|
+
return { ownership };
|
|
473
|
+
const factionData = faction && factionAccountDefinition.decode(faction);
|
|
474
|
+
if (faction === undefined ||
|
|
475
|
+
factionData?.game !== fleet.game ||
|
|
476
|
+
factionData.factionId !== fleet.npcFactionId) {
|
|
477
|
+
fail(`Faction ${addresses[1]} is missing or does not match NPC Fleet ${fleet.address}'s Game and faction id. Refresh the faction registry relationship before retrying.`, addresses[1]);
|
|
478
|
+
}
|
|
479
|
+
return { faction, ownership };
|
|
470
480
|
}
|
|
471
481
|
function generatedStance(stance) {
|
|
472
482
|
return {
|
|
473
483
|
ammoUsage: stance.ammoUsage === 'none' ? 0 : stance.ammoUsage === 'light' ? 1 : 2,
|
|
474
484
|
};
|
|
475
485
|
}
|
|
486
|
+
/** Requires a live Fleet snapshot of the configured Game with known AP, crew
|
|
487
|
+
* and ship composition; an attacking Fleet also needs AP available. */
|
|
488
|
+
function validateAttackFleet(fleet, role, game) {
|
|
489
|
+
const label = `The ${role} Fleet ${fleet.name} (${fleet.address})`;
|
|
490
|
+
if (fleet.game !== game) {
|
|
491
|
+
fail(`${label} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
492
|
+
}
|
|
493
|
+
if (fleet.state.kind === 'destroyed') {
|
|
494
|
+
fail(`${label} is destroyed and cannot participate in this attack. Refresh the Fleet after respawn and retry.`, fleet.address);
|
|
495
|
+
}
|
|
496
|
+
if (!Number.isSafeInteger(fleet.ap) ||
|
|
497
|
+
fleet.ap < 0 ||
|
|
498
|
+
!Number.isSafeInteger(fleet.crewCount) ||
|
|
499
|
+
fleet.crewCount <= 0) {
|
|
500
|
+
fail(`${label} has unknown or invalid AP or crew state. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
501
|
+
}
|
|
502
|
+
if (fleet.ships.length === 0 ||
|
|
503
|
+
fleet.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
504
|
+
fail(`${label} has no valid known ship composition. Refresh Fleet composition and retry.`, fleet.address);
|
|
505
|
+
}
|
|
506
|
+
if (role === 'attacking' && fleet.ap === 0) {
|
|
507
|
+
fail(`${label} has no known AP available. Wait for AP reload, refresh the Fleet, and retry.`, fleet.address);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
/** Validates the inputs every attack shares: the stance, an attacking Fleet
|
|
511
|
+
* owned by the authorization Profile that can attack, and a new Loot address
|
|
512
|
+
* distinct from the authorization signers. */
|
|
513
|
+
function validateAttack(ctx, attacker, inputStance, inputOptions) {
|
|
514
|
+
const options = validateAttackOptions(inputOptions);
|
|
515
|
+
const stance = validateAttackStance(inputStance);
|
|
516
|
+
const game = requireGameAddress(ctx);
|
|
517
|
+
if (attacker.ownerProfile.address !== options.authorization.profile) {
|
|
518
|
+
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
519
|
+
}
|
|
520
|
+
if (options.loot === options.authorization.authority ||
|
|
521
|
+
options.loot === options.authorization.profile) {
|
|
522
|
+
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
523
|
+
}
|
|
524
|
+
validateAttackFleet(attacker, 'attacking', game);
|
|
525
|
+
return { game, options, stance };
|
|
526
|
+
}
|
|
476
527
|
/** Plans one singleton Fleet-on-Fleet attack without predicting its outcome.
|
|
477
528
|
*
|
|
529
|
+
* At chain time the attacker must be Idle or subwarping (a finished warp
|
|
530
|
+
* counts as Idle), carry its required crew, and have finished reloading AP.
|
|
478
531
|
* Range, randomness, recent slot hashes, final combat arithmetic, and chain
|
|
479
532
|
* races remain authoritative. This Plan cannot be combined with another
|
|
480
533
|
* gameplay instruction because the generated program contract requires a
|
|
@@ -497,47 +550,16 @@ function generatedStance(stance) {
|
|
|
497
550
|
* ```
|
|
498
551
|
*/
|
|
499
552
|
export async function planFleetAttackFleet(ctx, attacker, defender, inputStance, inputOptions) {
|
|
500
|
-
const options =
|
|
501
|
-
const stance = validateAttackStance(inputStance);
|
|
502
|
-
const game = requireGameAddress(ctx);
|
|
553
|
+
const { game, options, stance } = validateAttack(ctx, attacker, inputStance, inputOptions);
|
|
503
554
|
if (attacker.address === defender.address) {
|
|
504
555
|
fail(`Fleet ${attacker.address} cannot attack itself. Choose a distinct defending Fleet and retry.`, attacker.address);
|
|
505
556
|
}
|
|
506
|
-
|
|
507
|
-
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
508
|
-
}
|
|
509
|
-
if (options.loot === options.authorization.authority ||
|
|
510
|
-
options.loot === options.authorization.profile) {
|
|
511
|
-
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
512
|
-
}
|
|
513
|
-
for (const [role, fleet] of [
|
|
514
|
-
['attacking', attacker],
|
|
515
|
-
['defending', defender],
|
|
516
|
-
]) {
|
|
517
|
-
if (fleet.game !== game) {
|
|
518
|
-
fail(`The ${role} Fleet ${fleet.address} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh both Fleets through this context and retry.`, fleet.address);
|
|
519
|
-
}
|
|
520
|
-
if (fleet.state.kind === 'destroyed') {
|
|
521
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) is destroyed and cannot participate in this attack. Refresh the Fleet after respawn and retry.`, fleet.address);
|
|
522
|
-
}
|
|
523
|
-
if (!Number.isSafeInteger(fleet.ap) ||
|
|
524
|
-
fleet.ap < 0 ||
|
|
525
|
-
!Number.isSafeInteger(fleet.crewCount) ||
|
|
526
|
-
fleet.crewCount <= 0) {
|
|
527
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) has unknown or invalid AP or crew state. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
528
|
-
}
|
|
529
|
-
if (fleet.ships.length === 0 ||
|
|
530
|
-
fleet.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
531
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) has no valid known ship composition. Refresh Fleet composition and retry.`, fleet.address);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
if (attacker.ap === 0) {
|
|
535
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no known AP available. Wait for AP reload, refresh the Fleet, and retry.`, attacker.address);
|
|
536
|
-
}
|
|
557
|
+
validateAttackFleet(defender, 'defending', game);
|
|
537
558
|
const currentAccounts = await readContextRawAccounts(ctx, [
|
|
538
559
|
attacker.address,
|
|
539
560
|
defender.address,
|
|
540
561
|
options.loot,
|
|
562
|
+
CLOCK_ADDRESS,
|
|
541
563
|
]);
|
|
542
564
|
if (currentAccounts[2] !== undefined) {
|
|
543
565
|
fail(`Loot account ${options.loot} already exists. Generate a new unused Loot signer address and retry.`, options.loot);
|
|
@@ -546,6 +568,7 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
546
568
|
validateCurrentAttackFleet(attacker, currentAccounts[0]),
|
|
547
569
|
validateCurrentAttackFleet(defender, currentAccounts[1]),
|
|
548
570
|
]);
|
|
571
|
+
validateAttackerReadiness(attacker, attackerAccount, currentAccounts[3]);
|
|
549
572
|
const registryAddress = await deriveAtlasRewardRegistryAddress(game);
|
|
550
573
|
const registry = await ctx.data.read(atlasRewardRegistryAccountDefinition, registryAddress);
|
|
551
574
|
if (registry.data.game !== game) {
|
|
@@ -590,12 +613,12 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
590
613
|
describes: 'Both operator XP budgets remain canonical and reconciled; earned XP and bank balances may change.',
|
|
591
614
|
}));
|
|
592
615
|
const instruction = adaptAttackFleetInstruction({
|
|
593
|
-
...(attackerNpc.
|
|
616
|
+
...(attackerNpc.faction === undefined
|
|
594
617
|
? {}
|
|
595
|
-
: { attackerFactionAccount: attackerNpc.
|
|
618
|
+
: { attackerFactionAccount: attackerNpc.faction.address }),
|
|
596
619
|
...(attackerNpc.ownership === undefined
|
|
597
620
|
? {}
|
|
598
|
-
: { attackerFleetOwnership: attackerNpc.ownership }),
|
|
621
|
+
: { attackerFleetOwnership: attackerNpc.ownership.address }),
|
|
599
622
|
attackerRewardsConfig: attackerRewards.config,
|
|
600
623
|
...(attackerRewards.contribution === undefined
|
|
601
624
|
? {}
|
|
@@ -616,7 +639,7 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
616
639
|
defenderCharacter,
|
|
617
640
|
...(defenderNpc.ownership === undefined
|
|
618
641
|
? {}
|
|
619
|
-
: { defenderFleetOwnership: defenderNpc.ownership }),
|
|
642
|
+
: { defenderFleetOwnership: defenderNpc.ownership.address }),
|
|
620
643
|
defenderRewardsConfig: defenderRewards.config,
|
|
621
644
|
...(defenderRewards.contribution === undefined
|
|
622
645
|
? {}
|
|
@@ -635,7 +658,7 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
635
658
|
stance: generatedStance(stance),
|
|
636
659
|
});
|
|
637
660
|
const description = `Attack Fleet ${defender.name} (${defender.address}) with Fleet ${attacker.name} (${attacker.address}) using ${stance.ammoUsage} ammunition; range, randomness, rewards, Loot, damage, and final combat arithmetic remain chain-authoritative.`;
|
|
638
|
-
return
|
|
661
|
+
return buildPlannerPlan({
|
|
639
662
|
kind: 'combat.attack-fleet',
|
|
640
663
|
preconditions: [
|
|
641
664
|
{
|
|
@@ -645,8 +668,8 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
645
668
|
describes: 'The exact attack instruction and both canonical operators remain bound.',
|
|
646
669
|
},
|
|
647
670
|
...xpGuards,
|
|
648
|
-
await
|
|
649
|
-
await
|
|
671
|
+
await accountStatePrecondition(attackerAccount, `Attacking Fleet ${attacker.name} retains its owner, Game, live state, crew, AP, faction, and ship composition.`),
|
|
672
|
+
await accountStatePrecondition(defenderAccount, `Defending Fleet ${defender.name} retains its owner, Game, live state, crew, faction, and ship composition.`),
|
|
650
673
|
],
|
|
651
674
|
steps: [
|
|
652
675
|
{
|
|
@@ -674,26 +697,26 @@ function systemFingerprint(system) {
|
|
|
674
697
|
version: system.version,
|
|
675
698
|
}, (_key, value) => typeof value === 'bigint' ? value.toString() : value);
|
|
676
699
|
}
|
|
677
|
-
function starbaseFactionId(owner) {
|
|
678
|
-
switch (owner) {
|
|
679
|
-
case 'mud':
|
|
680
|
-
return 1;
|
|
681
|
-
case 'oni':
|
|
682
|
-
return 2;
|
|
683
|
-
case 'ustur':
|
|
684
|
-
return 3;
|
|
685
|
-
case 'unaligned':
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
700
|
/** Plans one singleton Fleet-on-Starbase attack without predicting its outcome.
|
|
690
701
|
*
|
|
702
|
+
* At chain time the attacker must be Idle or subwarping (a finished warp
|
|
703
|
+
* counts as Idle), carry its required crew, and have finished reloading AP.
|
|
691
704
|
* The planner validates the owned attacking Fleet, canonical target System and
|
|
692
705
|
* nested shared Starbase, configured faction ownership mode, reward
|
|
693
706
|
* configuration, and the optional dynamic-NPC capture economy. Range,
|
|
694
707
|
* capture-cost debit outcome, randomness, damage, rewards, and final
|
|
695
708
|
* admissibility remain chain-authoritative.
|
|
696
709
|
*
|
|
710
|
+
* Requires Disabled rent: the Game's rent catalog and the target System's
|
|
711
|
+
* Starbase-level rent history must not exist, and both stay guarded absent until
|
|
712
|
+
* signing.
|
|
713
|
+
*
|
|
714
|
+
* From the RegionTracker, the attack reads only the target System's Region, so
|
|
715
|
+
* the Plan guards only that Region's owner, safety status and risk zone and a
|
|
716
|
+
* Starbase capture or upgrade in another Region leaves it valid. If the
|
|
717
|
+
* System's stored Region disagrees with the Region map, the whole tracker stays
|
|
718
|
+
* guarded.
|
|
719
|
+
*
|
|
697
720
|
* @example
|
|
698
721
|
* ```ts
|
|
699
722
|
* declare const ctx: SageContext;
|
|
@@ -711,32 +734,7 @@ function starbaseFactionId(owner) {
|
|
|
711
734
|
* ```
|
|
712
735
|
*/
|
|
713
736
|
export async function planFleetAttackStarbase(ctx, attacker, target, inputStance, inputOptions) {
|
|
714
|
-
const options =
|
|
715
|
-
const stance = validateAttackStance(inputStance);
|
|
716
|
-
const game = requireGameAddress(ctx);
|
|
717
|
-
if (attacker.ownerProfile.address !== options.authorization.profile) {
|
|
718
|
-
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
719
|
-
}
|
|
720
|
-
if (options.loot === options.authorization.authority ||
|
|
721
|
-
options.loot === options.authorization.profile) {
|
|
722
|
-
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
723
|
-
}
|
|
724
|
-
if (attacker.game !== game) {
|
|
725
|
-
fail(`Attacking Fleet ${attacker.address} belongs to Game ${attacker.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, attacker.address);
|
|
726
|
-
}
|
|
727
|
-
if (attacker.state.kind === 'destroyed') {
|
|
728
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) is destroyed and cannot attack a Starbase. Refresh the Fleet after respawn and retry.`, attacker.address);
|
|
729
|
-
}
|
|
730
|
-
if (!Number.isSafeInteger(attacker.ap) ||
|
|
731
|
-
attacker.ap <= 0 ||
|
|
732
|
-
!Number.isSafeInteger(attacker.crewCount) ||
|
|
733
|
-
attacker.crewCount <= 0) {
|
|
734
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no known positive AP or valid crew state. Wait for AP reload, refresh the Fleet, and retry.`, attacker.address);
|
|
735
|
-
}
|
|
736
|
-
if (attacker.ships.length === 0 ||
|
|
737
|
-
attacker.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
738
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no valid known ship composition. Refresh Fleet composition and retry.`, attacker.address);
|
|
739
|
-
}
|
|
737
|
+
const { game, options, stance } = validateAttack(ctx, attacker, inputStance, inputOptions);
|
|
740
738
|
if (target.game !== game) {
|
|
741
739
|
fail(`Target Star System ${target.address} belongs to Game ${target.game}, not configured Game ${game}. Refresh the target through this context and retry.`, target.address);
|
|
742
740
|
}
|
|
@@ -755,9 +753,10 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
755
753
|
deriveRegionTrackerAddress(game),
|
|
756
754
|
deriveFleetCrewBindingAddress(attacker.address),
|
|
757
755
|
]);
|
|
758
|
-
const [probeRelationsAccount, probeRegistryAccount] = await
|
|
759
|
-
relationTrackerAddress,
|
|
760
|
-
|
|
756
|
+
const [[probeRelationsAccount, probeRegistryAccount], attackerNpc, rent] = await Promise.all([
|
|
757
|
+
readContextRawAccounts(ctx, [relationTrackerAddress, registryAddress]),
|
|
758
|
+
resolveNpcAccounts(ctx, attacker, true),
|
|
759
|
+
requireDisabledLevelRent(ctx, game, target, 'the Starbase attack'),
|
|
761
760
|
]);
|
|
762
761
|
const probeRelations = factionRelationTrackerAccountDefinition.decode(requireAccount(probeRelationsAccount, relationTrackerAddress, `FactionRelationTracker ${relationTrackerAddress} is missing. Refresh faction relationships and retry.`));
|
|
763
762
|
const probeRegistry = atlasRewardRegistryAccountDefinition.decode(requireAccount(probeRegistryAccount, registryAddress, `AtlasRewardRegistry ${registryAddress} is missing. Refresh reward configuration and retry.`));
|
|
@@ -768,12 +767,6 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
768
767
|
fail(`AtlasRewardRegistry ${registryAddress} belongs to another Game. Refresh the configured reward registry and retry.`, registryAddress);
|
|
769
768
|
}
|
|
770
769
|
const rewardConfigAddress = await deriveAtlasRewardConfigAddress(game, probeRegistry.activeConfigVersion);
|
|
771
|
-
const attackerOwnership = attacker.npcFactionId === 0
|
|
772
|
-
? undefined
|
|
773
|
-
: await deriveFactionOwnershipAddress(game, 'fleet', attacker.address);
|
|
774
|
-
const attackerFaction = attacker.npcFactionId === 0
|
|
775
|
-
? undefined
|
|
776
|
-
: await deriveFactionAccountAddress(game, attacker.npcFactionId);
|
|
777
770
|
const requiresNpcEconomy = attacker.npcFactionId > 0 &&
|
|
778
771
|
probeRelations.dynamicCaptureEnabled &&
|
|
779
772
|
probeRelations.nemesisActive;
|
|
@@ -797,10 +790,9 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
797
790
|
character,
|
|
798
791
|
regionTracker,
|
|
799
792
|
crewBindingAddress,
|
|
800
|
-
...(attackerOwnership === undefined ? [] : [attackerOwnership]),
|
|
801
|
-
...(attackerFaction === undefined ? [] : [attackerFaction]),
|
|
802
793
|
...(factionEconomicsConfig === undefined ? [] : [factionEconomicsConfig]),
|
|
803
794
|
...(captorTreasury === undefined ? [] : [captorTreasury]),
|
|
795
|
+
CLOCK_ADDRESS,
|
|
804
796
|
];
|
|
805
797
|
const dependencyAccounts = await readContextRawAccounts(ctx, dependencyAddresses);
|
|
806
798
|
const current = new Map(dependencyAddresses.map((address, index) => [
|
|
@@ -811,6 +803,7 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
811
803
|
fail(`Loot account ${options.loot} already exists. Generate a new unused Loot signer address and retry.`, options.loot);
|
|
812
804
|
}
|
|
813
805
|
const attackerAccount = await validateCurrentAttackFleet(attacker, current.get(attacker.address));
|
|
806
|
+
validateAttackerReadiness(attacker, attackerAccount, current.get(CLOCK_ADDRESS));
|
|
814
807
|
const systemAccount = requireAccount(current.get(target.address), target.address, `Target Star System ${target.name} (${target.address}) is missing. Refresh world state and retry the attack.`);
|
|
815
808
|
const currentSystem = starSystemAccountDefinition.decode(systemAccount);
|
|
816
809
|
if ((await deriveStarSystemAddress(currentSystem.game, currentSystem.systemId)) !== target.address ||
|
|
@@ -834,7 +827,8 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
834
827
|
if (ownership === undefined && relations.dynamicCaptureEnabled) {
|
|
835
828
|
fail(`Target Starbase ${target.address} requires canonical FactionOwnership while dynamic capture is enabled. Refresh Starbase ownership and retry.`, ownershipAddress);
|
|
836
829
|
}
|
|
837
|
-
|
|
830
|
+
// KingSystemTracker records an unaligned owner as null.
|
|
831
|
+
const legacyOwner = factionValue(target.starbase.owner) || null;
|
|
838
832
|
if (ownership !== undefined &&
|
|
839
833
|
(ownership.game !== game ||
|
|
840
834
|
ownership.asset.kind !== 'starbase' ||
|
|
@@ -875,6 +869,20 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
875
869
|
if (regionTrackerData.game !== game) {
|
|
876
870
|
fail(`RegionTracker ${regionTracker} does not match configured Game ${game}. Refresh world region data and retry.`, regionTracker);
|
|
877
871
|
}
|
|
872
|
+
// The attack reads the target's stored Region. When the Region map agrees,
|
|
873
|
+
// guard only that Region's access data; otherwise keep the whole tracker.
|
|
874
|
+
const regionAccess = (await regionsContainingSystem(regionTrackerAccount, systemAccount, game))
|
|
875
|
+
.map(({ id }) => id)
|
|
876
|
+
.join() === String(currentSystem.regionId ?? '')
|
|
877
|
+
? {
|
|
878
|
+
kind: 'region-access',
|
|
879
|
+
address: regionTracker,
|
|
880
|
+
game,
|
|
881
|
+
system: target.address,
|
|
882
|
+
accessHash: await hashRegionAccess(regionTrackerAccount, systemAccount, game),
|
|
883
|
+
describes: `The Region holding target Star System ${target.name} keeps its owner, safety status and risk zone; other Regions may change.`,
|
|
884
|
+
}
|
|
885
|
+
: undefined;
|
|
878
886
|
const crewBindingAccount = current.get(crewBindingAddress);
|
|
879
887
|
const crewBinding = crewBindingAccount === undefined ? undefined : crewBindingAddress;
|
|
880
888
|
if (crewBindingAccount !== undefined) {
|
|
@@ -883,27 +891,6 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
883
891
|
fail(`FleetCrewBinding ${crewBindingAddress} does not belong to Fleet ${attacker.address} and Profile ${attacker.ownerProfile.address}. Refresh the Fleet crew relationship and retry.`, crewBindingAddress);
|
|
884
892
|
}
|
|
885
893
|
}
|
|
886
|
-
const attackerNpc = {};
|
|
887
|
-
let attackerOwnershipAccount;
|
|
888
|
-
let attackerFactionAccount;
|
|
889
|
-
if (attackerOwnership !== undefined && attackerFaction !== undefined) {
|
|
890
|
-
attackerOwnershipAccount = requireAccount(current.get(attackerOwnership), attackerOwnership, `NPC Fleet ${attacker.address} has no canonical FactionOwnership. Refresh the Fleet faction relationship and retry.`);
|
|
891
|
-
const npcOwnership = factionOwnershipAccountDefinition.decode(attackerOwnershipAccount);
|
|
892
|
-
if (npcOwnership.game !== game ||
|
|
893
|
-
npcOwnership.asset.kind !== 'fleet' ||
|
|
894
|
-
npcOwnership.asset.fleet !== attacker.address ||
|
|
895
|
-
npcOwnership.controllingFactionId !== attacker.npcFactionId) {
|
|
896
|
-
fail(`NPC Fleet ${attacker.address} has no matching canonical FactionOwnership for faction ${String(attacker.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`, attackerOwnership);
|
|
897
|
-
}
|
|
898
|
-
attackerFactionAccount = requireAccount(current.get(attackerFaction), attackerFaction, `Faction ${attackerFaction} is missing for NPC Fleet ${attacker.address}. Refresh the faction registry relationship and retry.`);
|
|
899
|
-
const npcFaction = factionAccountDefinition.decode(attackerFactionAccount);
|
|
900
|
-
if (npcFaction.game !== game ||
|
|
901
|
-
npcFaction.factionId !== attacker.npcFactionId) {
|
|
902
|
-
fail(`Faction ${attackerFaction} does not match NPC Fleet ${attacker.address}'s Game and faction id. Refresh the faction registry relationship before retrying.`, attackerFaction);
|
|
903
|
-
}
|
|
904
|
-
attackerNpc.ownership = attackerOwnership;
|
|
905
|
-
attackerNpc.factionAccount = attackerFaction;
|
|
906
|
-
}
|
|
907
894
|
let economicsAccount;
|
|
908
895
|
let treasuryAccount;
|
|
909
896
|
if (factionEconomicsConfig !== undefined && captorTreasury !== undefined) {
|
|
@@ -950,33 +937,29 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
950
937
|
'King-system target membership and ownership remain unchanged.',
|
|
951
938
|
],
|
|
952
939
|
[characterAccount, 'The attacking Profile Character remains canonical.'],
|
|
953
|
-
|
|
954
|
-
regionTrackerAccount,
|
|
955
|
-
'The configured Game RegionTracker remains canonical.',
|
|
956
|
-
],
|
|
957
|
-
...(crewBindingAccount === undefined
|
|
940
|
+
...(regionAccess
|
|
958
941
|
? []
|
|
959
942
|
: [
|
|
960
943
|
[
|
|
961
|
-
|
|
962
|
-
'
|
|
944
|
+
regionTrackerAccount,
|
|
945
|
+
`Target Star System ${target.name}'s stored Region differs from the Region map at its coordinate, so the whole configured Game RegionTracker remains guarded.`,
|
|
963
946
|
],
|
|
964
947
|
]),
|
|
965
|
-
...(
|
|
948
|
+
...(crewBindingAccount === undefined
|
|
966
949
|
? []
|
|
967
950
|
: [
|
|
968
951
|
[
|
|
969
|
-
|
|
970
|
-
'
|
|
952
|
+
crewBindingAccount,
|
|
953
|
+
'The optional Fleet crew binding remains unchanged.',
|
|
971
954
|
],
|
|
972
955
|
]),
|
|
973
|
-
...(
|
|
956
|
+
...(attackerNpc.ownership === undefined
|
|
957
|
+
? []
|
|
958
|
+
: [[attackerNpc.ownership, 'NPC Fleet ownership remains unchanged.']]),
|
|
959
|
+
...(attackerNpc.faction === undefined
|
|
974
960
|
? []
|
|
975
961
|
: [
|
|
976
|
-
[
|
|
977
|
-
attackerFactionAccount,
|
|
978
|
-
'The NPC faction account remains unchanged.',
|
|
979
|
-
],
|
|
962
|
+
[attackerNpc.faction, 'The NPC faction account remains unchanged.'],
|
|
980
963
|
]),
|
|
981
964
|
...(economicsAccount === undefined
|
|
982
965
|
? []
|
|
@@ -994,12 +977,12 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
994
977
|
'The dynamic-capture treasury remains unchanged.',
|
|
995
978
|
],
|
|
996
979
|
]),
|
|
997
|
-
].map(([account, describes]) =>
|
|
980
|
+
].map(([account, describes]) => accountStatePrecondition(account, describes)));
|
|
998
981
|
const absencePreconditions = [
|
|
999
|
-
|
|
982
|
+
accountAbsentPrecondition(options.loot, `Loot account ${options.loot} remains absent until execution.`),
|
|
1000
983
|
...(crewBindingAccount === undefined
|
|
1001
984
|
? [
|
|
1002
|
-
|
|
985
|
+
accountAbsentPrecondition(crewBindingAddress, 'Optional Fleet crew binding remains absent.'),
|
|
1003
986
|
]
|
|
1004
987
|
: []),
|
|
1005
988
|
];
|
|
@@ -1011,11 +994,13 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
1011
994
|
character,
|
|
1012
995
|
});
|
|
1013
996
|
const description = `Attack with Fleet ${attacker.name} (${attacker.address}) against the shared Starbase at ${target.name} (${target.address}) using ${stance.ammoUsage} ammunition; range, capture-cost debit outcome, randomness, rewards, Loot, damage, and final admissibility remain chain-authoritative.`;
|
|
1014
|
-
return
|
|
997
|
+
return buildPlannerPlan({
|
|
1015
998
|
kind: 'combat.attack-starbase',
|
|
1016
999
|
preconditions: [
|
|
1017
1000
|
...statePreconditions,
|
|
1001
|
+
...(regionAccess ? [regionAccess] : []),
|
|
1018
1002
|
...absencePreconditions,
|
|
1003
|
+
...rent.guards,
|
|
1019
1004
|
...runtime.guards,
|
|
1020
1005
|
],
|
|
1021
1006
|
steps: [
|
|
@@ -1023,12 +1008,12 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
1023
1008
|
describes: `${description} ${runtime.description}`,
|
|
1024
1009
|
instruction: adaptAttackStarbaseInstruction({
|
|
1025
1010
|
...runtime.accounts,
|
|
1026
|
-
...(attackerNpc.
|
|
1011
|
+
...(attackerNpc.faction === undefined
|
|
1027
1012
|
? {}
|
|
1028
|
-
: { attackerFactionAccount: attackerNpc.
|
|
1013
|
+
: { attackerFactionAccount: attackerNpc.faction.address }),
|
|
1029
1014
|
...(attackerNpc.ownership === undefined
|
|
1030
1015
|
? {}
|
|
1031
|
-
: { attackerFleetOwnership: attackerNpc.ownership }),
|
|
1016
|
+
: { attackerFleetOwnership: attackerNpc.ownership.address }),
|
|
1032
1017
|
authorization: options.authorization,
|
|
1033
1018
|
...(captorTreasury === undefined ? {} : { captorTreasury }),
|
|
1034
1019
|
character,
|
|
@@ -1046,6 +1031,7 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
1046
1031
|
loot: options.loot,
|
|
1047
1032
|
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
1048
1033
|
regionTracker,
|
|
1034
|
+
...rent.accounts,
|
|
1049
1035
|
rewardConfig: rewardConfigAddress,
|
|
1050
1036
|
rewardRegistry: registryAddress,
|
|
1051
1037
|
stance: generatedStance(stance),
|
|
@@ -1067,11 +1053,11 @@ function lootSnapshotFingerprint(loot) {
|
|
|
1067
1053
|
loot.coordinates.x,
|
|
1068
1054
|
loot.coordinates.y,
|
|
1069
1055
|
...loot.items.map((item) => [
|
|
1070
|
-
item.destroyer
|
|
1056
|
+
item.destroyer?.address ?? '',
|
|
1071
1057
|
item.exclusivityUnlockAtUnixSeconds,
|
|
1072
1058
|
item.rewardReclaimAtUnixSeconds,
|
|
1073
1059
|
item.inventory.sequenceId,
|
|
1074
|
-
item.inventory.
|
|
1060
|
+
item.inventory.usedStorageUnitsRaw,
|
|
1075
1061
|
...item.inventory.items
|
|
1076
1062
|
.map(({ cargo, quantityRaw }) => `${String(cargo.id)}:${String(quantityRaw)}`)
|
|
1077
1063
|
.sort(),
|
|
@@ -1087,11 +1073,11 @@ function rawLootFingerprint(address, loot) {
|
|
|
1087
1073
|
loot.coordinates.x,
|
|
1088
1074
|
loot.coordinates.y,
|
|
1089
1075
|
...loot.items.map((item) => [
|
|
1090
|
-
item.destroyer,
|
|
1076
|
+
item.destroyer ?? '',
|
|
1091
1077
|
item.exclusivityUnlockAtUnixSeconds,
|
|
1092
1078
|
item.rewardReclaimAtUnixSeconds,
|
|
1093
1079
|
item.inventory.sequenceId,
|
|
1094
|
-
item.inventory.
|
|
1080
|
+
item.inventory.usedStorageUnitsRaw,
|
|
1095
1081
|
...item.inventory.amounts
|
|
1096
1082
|
.map(({ amount, cargoId }) => `${String(cargoId)}:${String(amount)}`)
|
|
1097
1083
|
.sort(),
|
|
@@ -1100,10 +1086,12 @@ function rawLootFingerprint(address, loot) {
|
|
|
1100
1086
|
}
|
|
1101
1087
|
/** Plans one transaction-exclusive retrieval from a loaded Loot snapshot.
|
|
1102
1088
|
*
|
|
1103
|
-
* The planner validates the owned idle Fleet,
|
|
1104
|
-
*
|
|
1105
|
-
*
|
|
1106
|
-
*
|
|
1089
|
+
* The planner validates the owned idle Fleet, its normalized crew and usable
|
|
1090
|
+
* ability power at `atUnixSeconds`, Loot identity, destroyer exclusivity and
|
|
1091
|
+
* reward locks against the authorization Profile, and every requested known
|
|
1092
|
+
* quantity. Retrieval spends the Fleet's whole ability power pool. Range,
|
|
1093
|
+
* recent-slot inputs, destination capacity, intervening races, and final
|
|
1094
|
+
* acquired quantities remain chain-authoritative.
|
|
1107
1095
|
*
|
|
1108
1096
|
* @example
|
|
1109
1097
|
* ```ts
|
|
@@ -1151,6 +1139,13 @@ export async function planFleetRetrieveLoot(ctx, fleet, loot, inputWant, inputOp
|
|
|
1151
1139
|
currentFleet.crewCount !== fleet.crewCount) {
|
|
1152
1140
|
fail(`Fleet ${fleet.name} (${fleet.address}) changed or no longer matches its canonical Game, owner, label, idle state, or crew. Refresh the Fleet and retry.`, fleet.address);
|
|
1153
1141
|
}
|
|
1142
|
+
if (currentFleet.crewCount < currentFleet.stats.misc.requiredCrew) {
|
|
1143
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) has ${String(currentFleet.crewCount)} crew but needs ${String(currentFleet.stats.misc.requiredCrew)} to retrieve Loot. Load crew, refresh the Fleet, and retry.`, fleet.address);
|
|
1144
|
+
}
|
|
1145
|
+
if (currentFleet.ap <= 0 ||
|
|
1146
|
+
options.atUnixSeconds < currentFleet.apReloadExpiresAt) {
|
|
1147
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) has no usable ability power at ${String(options.atUnixSeconds)} Unix seconds: stored AP ${String(currentFleet.ap)} with reload completing at ${String(currentFleet.apReloadExpiresAt)}. Retrieving Loot spends the whole AP pool; wait for the reload, refresh the Fleet, and retry.`, fleet.address);
|
|
1148
|
+
}
|
|
1154
1149
|
const lootAccount = requireAccount(lootAccountValue, loot.address, `Loot ${loot.address} is no longer available. Refresh Loot discovery and choose an available account before retrying.`);
|
|
1155
1150
|
const currentLoot = lootAccountDefinition.decode(lootAccount);
|
|
1156
1151
|
if (rawLootFingerprint(lootAccount.address, currentLoot) !==
|
|
@@ -1160,28 +1155,33 @@ export async function planFleetRetrieveLoot(ctx, fleet, loot, inputWant, inputOp
|
|
|
1160
1155
|
const lootCreator = loot.profile.address === options.authorization.profile
|
|
1161
1156
|
? undefined
|
|
1162
1157
|
: loot.profile.address;
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1158
|
+
const instruction = adaptRetrieveLootInstruction({
|
|
1159
|
+
authorization: options.authorization,
|
|
1160
|
+
fleet: fleet.address,
|
|
1161
|
+
game,
|
|
1162
|
+
loot: loot.address,
|
|
1163
|
+
...(lootCreator === undefined ? {} : { lootCreator }),
|
|
1164
|
+
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
1165
|
+
want: selection.generated.map(([itemIndex, cargo]) => [
|
|
1166
|
+
itemIndex,
|
|
1167
|
+
cargo.map(([cargoId, quantity]) => [cargoId, quantity]),
|
|
1168
|
+
]),
|
|
1169
|
+
});
|
|
1170
|
+
// Retrieved cargo can open hold lines, which the program funds from the
|
|
1171
|
+
// Profile vault before the emptied Loot refunds its rent.
|
|
1172
|
+
const storage = await planFleetStorage(ctx, instruction, [fleetAccount.address], options.authorization.profile, 'Loot retrieval');
|
|
1173
|
+
const description = `Request ${selection.summary} from Loot ${loot.address} with Fleet ${fleet.name} (${fleet.address}); this spends the Fleet's whole ability power pool. Range, recent-slot randomness, cargo capacity, availability races, and final transfer quantities remain chain-authoritative. ${storage.disclosure}`;
|
|
1174
|
+
return buildPlannerPlan({
|
|
1165
1175
|
kind: 'combat.retrieve-loot',
|
|
1166
1176
|
preconditions: [
|
|
1167
|
-
await
|
|
1168
|
-
await
|
|
1177
|
+
await accountStatePrecondition(fleetAccount, `Fleet ${fleet.name} retains its configured Game, owning Profile, idle state, and normalized crew.`),
|
|
1178
|
+
await accountStatePrecondition(lootAccount, `Loot ${loot.address} retains its identity, creator, destroyer exclusivity, and requested known quantities.`),
|
|
1179
|
+
storage.guard,
|
|
1169
1180
|
],
|
|
1170
1181
|
steps: [
|
|
1171
1182
|
{
|
|
1172
1183
|
describes: description,
|
|
1173
|
-
instruction
|
|
1174
|
-
authorization: options.authorization,
|
|
1175
|
-
fleet: fleet.address,
|
|
1176
|
-
game,
|
|
1177
|
-
loot: loot.address,
|
|
1178
|
-
...(lootCreator === undefined ? {} : { lootCreator }),
|
|
1179
|
-
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
1180
|
-
want: selection.generated.map(([itemIndex, cargo]) => [
|
|
1181
|
-
itemIndex,
|
|
1182
|
-
cargo.map(([cargoId, quantity]) => [cargoId, quantity]),
|
|
1183
|
-
]),
|
|
1184
|
-
}),
|
|
1184
|
+
instruction,
|
|
1185
1185
|
semantics: [{ kind: 'exclusive', scope: 'transaction' }],
|
|
1186
1186
|
signers: [options.authorization.authority],
|
|
1187
1187
|
},
|
|
@@ -1189,4 +1189,16 @@ export async function planFleetRetrieveLoot(ctx, fleet, loot, inputWant, inputOp
|
|
|
1189
1189
|
summary: description,
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
|
+
/** Reads the Profile, Rent and the action's other storage accounts, and plans
|
|
1193
|
+
* its Profile storage funding. */
|
|
1194
|
+
async function planFleetStorage(ctx, instruction, addresses, profile, label, stimulantStats) {
|
|
1195
|
+
const all = [...addresses, profile, RENT_ADDRESS];
|
|
1196
|
+
const rows = await readContextRawAccounts(ctx, all);
|
|
1197
|
+
const accounts = new Map(all.map((address, index) => [address, rows[index]]));
|
|
1198
|
+
return planStorageFunding({
|
|
1199
|
+
action: readCombatStorageAction(instruction, accounts, stimulantStats),
|
|
1200
|
+
accounts,
|
|
1201
|
+
label,
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1192
1204
|
//# sourceMappingURL=index.js.map
|