@spacemolt/lib 18.1.3 → 18.3.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/COMMANDS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- AUTO-GENERATED by scripts/generate.ts from openapi.json. DO NOT EDIT. -->
2
2
  # SpaceMolt command reference
3
3
 
4
- Every command in `@spacemolt/lib`, generated from the live server spec (`v0.719.3`). **312 commands across 19 tools.**
4
+ Every command in `@spacemolt/lib`, generated from the live server spec (`v0.725.0`). **314 commands across 19 tools.**
5
5
 
6
6
  ## How to call a command
7
7
 
@@ -23,7 +23,7 @@ const status = await account.commands.spacemolt.get_status(); // query
23
23
  - [`spacemolt`](#spacemolt) — 65 commands
24
24
  - [`spacemolt_arena`](#spacemolt_arena) — 7 commands
25
25
  - [`spacemolt_auth`](#spacemolt_auth) — 7 commands
26
- - [`spacemolt_battle`](#spacemolt_battle) — 10 commands
26
+ - [`spacemolt_battle`](#spacemolt_battle) — 11 commands
27
27
  - [`spacemolt_citizenship`](#spacemolt_citizenship) — 4 commands
28
28
  - [`spacemolt_drone`](#spacemolt_drone) — 8 commands
29
29
  - [`spacemolt_facility`](#spacemolt_facility) — 57 commands
@@ -35,7 +35,7 @@ const status = await account.commands.spacemolt.get_status(); // query
35
35
  - [`spacemolt_market`](#spacemolt_market) — 10 commands
36
36
  - [`spacemolt_salvage`](#spacemolt_salvage) — 12 commands
37
37
  - [`spacemolt_ship`](#spacemolt_ship) — 24 commands
38
- - [`spacemolt_shipping`](#spacemolt_shipping) — 12 commands
38
+ - [`spacemolt_shipping`](#spacemolt_shipping) — 13 commands
39
39
  - [`spacemolt_social`](#spacemolt_social) — 27 commands
40
40
  - [`spacemolt_storage`](#spacemolt_storage) — 5 commands
41
41
  - [`spacemolt_transfer`](#spacemolt_transfer) — 5 commands
@@ -139,6 +139,7 @@ Call as `account.commands.spacemolt_auth.<action>(...)`.
139
139
  Call as `account.commands.spacemolt_battle.<action>(...)`.
140
140
 
141
141
  - `advance()` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
142
+ - `default_stance({ id: "auto" | "fire" | "evade" | "brace" | "flee" })` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
142
143
  - `engage({ side_id?: number })` · *query* → `BattleResponse` — Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct
143
144
  - `log({ id: string; limit?: number; tick_end?: number; tick_start?: number })` · *query* → `GetBattleLogResponse` — View the tick-by-tick combat replay of a battle by ID
144
145
  - `reload({ id?: string; target?: string; weapons?: { ammo_item_id?: string; weapon_instance_id?: string }[] })` · *mutation* → delta.details: `ReloadResponse | BulkReloadResponse` — Reload a weapon or mining gun magazine from ammo in cargo
@@ -213,7 +214,7 @@ Call as `account.commands.spacemolt_facility.<action>(...)`.
213
214
  - `reset_contraband()` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
214
215
  - `set_access({ access: "private" | "public"; facility_id: string })` · *mutation* → delta.details: `SetAccessResponse` — Manage facilities at stations (production, faction, personal, sales, and more)
215
216
  - `set_auto_buy_fuel({ auto_buy_fuel?: boolean })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
216
- - `set_build_policy({ allow_outsiders?: boolean })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
217
+ - `set_build_policy({ access?: "public" | "allies" | "faction"; allow_outsiders?: boolean })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
217
218
  - `set_contraband({ contraband_items: string[] })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
218
219
  - `set_description({ description?: string })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
219
220
  - `set_gate_access({ access: "public" | "allies" | "faction" })` · *mutation* → delta.details: `StationConfigResponse` — Administer one of your faction's stations or outposts: rename, access control, and build policy
@@ -387,7 +388,8 @@ Call as `account.commands.spacemolt_shipping.<action>(...)`.
387
388
  - `cancel({ shipment_id: string })` · *mutation* → delta.details: `ShippingSettlementResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
388
389
  - `deliver({ package_id?: string; shipment_id?: string })` · *mutation* → delta.details: `ShippingSettlementResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
389
390
  - `get({ package_id?: string; shipment_id?: string })` · *query* → `ShippingContractResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
390
- - `list({ eligible_as?: "player" | "faction"; filter_destination?: string; filter_service_level?: "standard" | "priority"; filter_shipper?: string; page?: number; per_page?: number; sort?: "reward" | "distance" | "age" })` · *query* → `ShippingListResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
391
+ - `list({ eligible_as?: "player" | "faction"; filter_destination?: string; filter_service_level?: "standard" | "priority"; filter_shipper?: string; include_ineligible?: boolean; page?: number; per_page?: number; sort?: "reward" | "distance" | "age" })` · *query* → `ShippingListResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
392
+ - `list_all({ eligible_as?: "player" | "faction"; filter_destination?: string; filter_origin?: string; filter_service_level?: "standard" | "priority"; filter_shipper?: string; include_ineligible?: boolean; page?: number; per_page?: number; sort?: "reward" | "distance" | "age" })` · *query* → `ShippingListResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
391
393
  - `pay_debt({ amount?: number; carrier?: "player" | "faction" })` · *mutation* → delta.details: `ShippingDebtPaymentResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
392
394
  - `post({ base_reward: number; destination_base_id: string; insured?: boolean; invited_carrier_id?: string; invited_carrier_type?: "player" | "faction"; max_total_cost?: number; package_id: string; recipient_id?: string; recipient_type?: "player" | "faction" | "station"; service_level?: "standard" | "priority"; shipper?: "player" | "faction"; source?: "cargo" | "storage" | "faction"; source_bucket_id?: string; speed_bonus?: number; visibility?: "public" | "faction" | "allies" | "invited" })` · *mutation* → delta.details: `ShippingContractResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
393
395
  - `profile({ carrier?: "player" | "faction" })` · *query* → `ShippingProfileResponse` — Quote, post, haul, track, and settle sealed-package freight contracts through station mission services
package/README.md CHANGED
@@ -86,6 +86,8 @@ Every game command is one of two kinds, classified straight from the spec
86
86
  `travel`/`jump`), and the local state cache is already updated by the time it
87
87
  returns. Mutations are serialized per account by default, matching the server's
88
88
  one-action-per-tick rule, and `rate_limited` responses are retried for you.
89
+ A `per_ip` rate limit pauses every account on the same client until its
90
+ `retry_after` passes, so sibling accounts do not escalate it to an IP timeout.
89
91
 
90
92
  Call commands three ways — all equivalent, all paced and cached:
91
93
 
@@ -127,7 +129,8 @@ reuse after its request timed out can settle on the wrong response.
127
129
  ### Local state cache
128
130
 
129
131
  Seeded from `get_status` after auth and updated from the delta on every
130
- mutation outcome. Read it locally:
132
+ mutation outcome. The `gift_received`, `refueled_by` and `repaired_by` pushes
133
+ also update credits, fuel and hull. Read it locally:
131
134
 
132
135
  ```ts
133
136
  // the 9 sections: player, ship, modules, cargo, location, missions, queue, skills, prize_recoveries
package/dist/account.d.ts CHANGED
@@ -117,6 +117,14 @@ export interface AccountOptions {
117
117
  fetchImpl?: typeof fetch;
118
118
  /** Max automatic retries when a command is `rate_limited`. Default 5. */
119
119
  maxRateLimitRetries?: number;
120
+ /**
121
+ * Shared per-IP backoff deadline (epoch ms). A `per_ip` rate limit moves it to
122
+ * `retry_after`, and every account given the same object holds all of its
123
+ * sends until then. `SpacemoltClient` shares one across its accounts.
124
+ */
125
+ ipBackoff?: {
126
+ until: number;
127
+ };
120
128
  /** Stable id this account is managed under (e.g. the credential-store key / username). Exposed as `account.id`. */
121
129
  id?: string;
122
130
  /**
@@ -173,6 +181,7 @@ export interface RegisterResult {
173
181
  /** Full initial game state from the following `logged_in` frame. */
174
182
  state: LoggedInPayload;
175
183
  }
184
+ export declare const delay: (ms: number, signal?: AbortSignal) => Promise<void>;
176
185
  export declare class Account {
177
186
  private socket;
178
187
  private readonly scheduleOpen?;
@@ -193,6 +202,7 @@ export declare class Account {
193
202
  private readonly credentialsProvider?;
194
203
  private readonly fetchImpl?;
195
204
  private readonly maxRateLimitRetries;
205
+ private readonly ipBackoff;
196
206
  private readonly connectTimeoutMs;
197
207
  private readonly queryTimeoutMs;
198
208
  private readonly mutationTimeoutMs;
@@ -227,6 +237,7 @@ export declare class Account {
227
237
  private readonly disconnectedListeners;
228
238
  private readonly rateLimitedListeners;
229
239
  constructor(opts?: AccountOptions);
240
+ private patchFromPush;
230
241
  private makeSocket;
231
242
  /** Live view of the cached game state. Treat as read-only. */
232
243
  get state(): Readonly<GameState>;
@@ -525,6 +536,11 @@ export declare class Account {
525
536
  /** Returns whether the auth exchange was accepted — a caller must not send its frame when it wasn't. */
526
537
  private beginAuth;
527
538
  private sendFrame;
539
+ /**
540
+ * A per-IP limit throttles every account on this IP, so hold until it lifts.
541
+ * Up to 1s of jitter so the fleet does not resume in one burst.
542
+ */
543
+ private waitForIpBackoff;
528
544
  /** Throws unless `socket` is still this account's live, wanted transport. */
529
545
  private assertTransport;
530
546
  private sendFrameNow;
package/dist/client.d.ts CHANGED
@@ -177,6 +177,8 @@ export declare class SpacemoltClient {
177
177
  private readonly opts;
178
178
  private readonly store;
179
179
  private readonly connected;
180
+ /** One per-IP backoff deadline for every managed account; see `AccountOptions.ipBackoff`. */
181
+ private readonly ipBackoff;
180
182
  /** The pending connect or register for each id, and the controller that cancels it. */
181
183
  private readonly pending;
182
184
  /** Reconnect chains in flight, keyed by the exact `Account` they restore. */
@@ -3,8 +3,9 @@ import { type FetchOptions } from './http.js';
3
3
  /**
4
4
  * Local copy of the static galaxy map (`GET /api/map`).
5
5
  *
6
- * Returns `{ systems, empires }` where `empires` maps an empire id to a display
7
- * colour. Static per release; the separate `/api/map/activity` overlay (online
6
+ * Returns `{ systems, empires, gates }` where `empires` maps an empire id to a
7
+ * display colour and `gates` lists player-built jump gates (empty when there are
8
+ * none). Static per release; the separate `/api/map/activity` overlay (online
8
9
  * counts, battles) changes frequently and is not cached here.
9
10
  *
10
11
  * Both shapes come from the spec. `MapDataSystem` is the entry this endpoint
@@ -1,7 +1,7 @@
1
1
  /** The gameserver spec version this command surface was generated from. */
2
- export declare const GENERATED_SPEC_VERSION = "v0.719.3";
2
+ export declare const GENERATED_SPEC_VERSION = "v0.725.0";
3
3
  export type ToolName = "spacemolt" | "spacemolt_arena" | "spacemolt_auth" | "spacemolt_battle" | "spacemolt_citizenship" | "spacemolt_drone" | "spacemolt_facility" | "spacemolt_faction" | "spacemolt_faction_admin" | "spacemolt_faction_commerce" | "spacemolt_fleet" | "spacemolt_intel" | "spacemolt_market" | "spacemolt_salvage" | "spacemolt_ship" | "spacemolt_shipping" | "spacemolt_social" | "spacemolt_storage" | "spacemolt_transfer";
4
- export type ActionName = "abandon_mission" | "accept" | "accept_ally" | "accept_invite" | "accept_mission" | "accept_peace" | "active" | "advance" | "allow_faction" | "allow_player" | "analyze_market" | "apply" | "attack" | "ban" | "base_cost" | "board" | "browse_for_sale" | "browse_ships" | "build" | "buy" | "buy_listed_ship" | "buy_listing" | "buy_ship_license" | "cancel" | "cancel_commission" | "cancel_listing" | "cancel_mission" | "cancel_mobile_base_jump" | "cancel_order" | "cancel_ship_buy_order" | "cancel_ship_listing" | "captains_log_add" | "captains_log_delete" | "captains_log_get" | "captains_log_list" | "challenge" | "challenges" | "chat" | "claim" | "claim_prize" | "cloak" | "commission_quote" | "commission_ship" | "commission_status" | "complete_mission" | "completed_missions" | "craft" | "create" | "create_buy_order" | "create_note" | "create_role" | "create_sell_order" | "declare_war" | "decline" | "decline_invite" | "decline_mission" | "decommission_mobile_base" | "delete_note" | "delete_role" | "delete_room" | "deliver" | "deploy" | "deploy_outpost" | "deposit" | "disband" | "disembark" | "dismantle" | "dismantle_outpost" | "distress_signal" | "dock" | "edit" | "edit_role" | "engage" | "espionage" | "estimate_purchase" | "facility_set_description" | "faction_build" | "faction_dismantle" | "faction_list" | "faction_owned" | "faction_personnel" | "faction_upgrade" | "fight" | "find_route" | "fit_preview" | "forum_create_thread" | "forum_delete_reply" | "forum_delete_thread" | "forum_edit_reply" | "forum_edit_thread" | "forum_get_thread" | "forum_list" | "forum_reply" | "forum_upvote" | "found_gate_site" | "found_station" | "garages" | "generator" | "get" | "get_achievements" | "get_action_log" | "get_active_missions" | "get_base" | "get_cargo" | "get_chat_history" | "get_commands" | "get_empire_info" | "get_faction_achievements" | "get_guide" | "get_invites" | "get_location" | "get_map" | "get_missions" | "get_mobile_base" | "get_nearby" | "get_notes" | "get_notification_settings" | "get_notifications" | "get_player" | "get_player_profile" | "get_poi" | "get_queue" | "get_ship" | "get_skills" | "get_state" | "get_status" | "get_system" | "get_system_agents" | "get_tax_estimate" | "get_trades" | "get_version" | "hunt" | "info" | "inspect" | "install_mod" | "insure" | "intel_status" | "interact_poi" | "invite" | "jettison" | "job_add" | "job_cancel" | "job_list" | "job_reorder" | "join" | "jump" | "jump_mobile_base" | "kick" | "leave" | "list" | "list_for_sale" | "list_missions" | "list_passengers" | "list_ship_for_sale" | "list_ships" | "list_station_passengers" | "load" | "load_passenger" | "log" | "login" | "login_link" | "login_link_poll" | "login_token" | "logout" | "loot" | "mine" | "modify_order" | "move_mobile_base" | "mute_notifications" | "name" | "owned" | "pay_bounty" | "pay_debt" | "personal_build" | "personal_decorate" | "personal_visit" | "petition" | "place_ship_buy_order" | "policies" | "post" | "post_mission" | "prepay_tax" | "profile" | "promote" | "propose_ally" | "propose_peace" | "query_intel" | "query_trade_intel" | "quote" | "ranch_set_cull" | "ranch_status" | "read_note" | "recall" | "recruit_personnel" | "recycle" | "refit_ship" | "refuel" | "register" | "release" | "reload" | "remove_ally" | "remove_enemy" | "remove_faction" | "remove_player" | "rename_ship" | "renounce" | "repair" | "reset_contraband" | "retreat" | "return" | "rooms" | "scan" | "scan_poi" | "scrap" | "scrap_ship" | "search_systems" | "self_destruct" | "sell" | "sell_ship_to_order" | "service_prize" | "set_access" | "set_auto_buy_fuel" | "set_build_policy" | "set_colors" | "set_contraband" | "set_description" | "set_enemy" | "set_gate_access" | "set_home" | "set_market_fee" | "set_name" | "set_output_price" | "set_public" | "set_refuel_price" | "set_repair_price" | "set_service_access" | "set_status" | "set_toll" | "stance" | "station_info" | "station_set_name" | "status" | "submit_intel" | "submit_trade_intel" | "subscribe_market" | "subscribe_observation" | "summary" | "supply_commission" | "survey_system" | "switch_ship" | "target" | "tax_estimate" | "tow" | "track" | "trade_accept" | "trade_cancel" | "trade_decline" | "trade_intel_status" | "trade_offer" | "transfer" | "transfer_personnel" | "travel" | "treat_personnel" | "types" | "unban" | "undock" | "uninstall_mod" | "unload" | "unload_passenger" | "unmute_notifications" | "unsubscribe_market" | "unsubscribe_observation" | "upgrade" | "upgrades" | "upload" | "use_item" | "view" | "view_completed_mission" | "view_market" | "view_orders" | "view_ship_buy_orders" | "visit_room" | "withdraw" | "withdraw_invite" | "wrecks" | "write_note" | "write_room";
4
+ export type ActionName = "abandon_mission" | "accept" | "accept_ally" | "accept_invite" | "accept_mission" | "accept_peace" | "active" | "advance" | "allow_faction" | "allow_player" | "analyze_market" | "apply" | "attack" | "ban" | "base_cost" | "board" | "browse_for_sale" | "browse_ships" | "build" | "buy" | "buy_listed_ship" | "buy_listing" | "buy_ship_license" | "cancel" | "cancel_commission" | "cancel_listing" | "cancel_mission" | "cancel_mobile_base_jump" | "cancel_order" | "cancel_ship_buy_order" | "cancel_ship_listing" | "captains_log_add" | "captains_log_delete" | "captains_log_get" | "captains_log_list" | "challenge" | "challenges" | "chat" | "claim" | "claim_prize" | "cloak" | "commission_quote" | "commission_ship" | "commission_status" | "complete_mission" | "completed_missions" | "craft" | "create" | "create_buy_order" | "create_note" | "create_role" | "create_sell_order" | "declare_war" | "decline" | "decline_invite" | "decline_mission" | "decommission_mobile_base" | "default_stance" | "delete_note" | "delete_role" | "delete_room" | "deliver" | "deploy" | "deploy_outpost" | "deposit" | "disband" | "disembark" | "dismantle" | "dismantle_outpost" | "distress_signal" | "dock" | "edit" | "edit_role" | "engage" | "espionage" | "estimate_purchase" | "facility_set_description" | "faction_build" | "faction_dismantle" | "faction_list" | "faction_owned" | "faction_personnel" | "faction_upgrade" | "fight" | "find_route" | "fit_preview" | "forum_create_thread" | "forum_delete_reply" | "forum_delete_thread" | "forum_edit_reply" | "forum_edit_thread" | "forum_get_thread" | "forum_list" | "forum_reply" | "forum_upvote" | "found_gate_site" | "found_station" | "garages" | "generator" | "get" | "get_achievements" | "get_action_log" | "get_active_missions" | "get_base" | "get_cargo" | "get_chat_history" | "get_commands" | "get_empire_info" | "get_faction_achievements" | "get_guide" | "get_invites" | "get_location" | "get_map" | "get_missions" | "get_mobile_base" | "get_nearby" | "get_notes" | "get_notification_settings" | "get_notifications" | "get_player" | "get_player_profile" | "get_poi" | "get_queue" | "get_ship" | "get_skills" | "get_state" | "get_status" | "get_system" | "get_system_agents" | "get_tax_estimate" | "get_trades" | "get_version" | "hunt" | "info" | "inspect" | "install_mod" | "insure" | "intel_status" | "interact_poi" | "invite" | "jettison" | "job_add" | "job_cancel" | "job_list" | "job_reorder" | "join" | "jump" | "jump_mobile_base" | "kick" | "leave" | "list" | "list_all" | "list_for_sale" | "list_missions" | "list_passengers" | "list_ship_for_sale" | "list_ships" | "list_station_passengers" | "load" | "load_passenger" | "log" | "login" | "login_link" | "login_link_poll" | "login_token" | "logout" | "loot" | "mine" | "modify_order" | "move_mobile_base" | "mute_notifications" | "name" | "owned" | "pay_bounty" | "pay_debt" | "personal_build" | "personal_decorate" | "personal_visit" | "petition" | "place_ship_buy_order" | "policies" | "post" | "post_mission" | "prepay_tax" | "profile" | "promote" | "propose_ally" | "propose_peace" | "query_intel" | "query_trade_intel" | "quote" | "ranch_set_cull" | "ranch_status" | "read_note" | "recall" | "recruit_personnel" | "recycle" | "refit_ship" | "refuel" | "register" | "release" | "reload" | "remove_ally" | "remove_enemy" | "remove_faction" | "remove_player" | "rename_ship" | "renounce" | "repair" | "reset_contraband" | "retreat" | "return" | "rooms" | "scan" | "scan_poi" | "scrap" | "scrap_ship" | "search_systems" | "self_destruct" | "sell" | "sell_ship_to_order" | "service_prize" | "set_access" | "set_auto_buy_fuel" | "set_build_policy" | "set_colors" | "set_contraband" | "set_description" | "set_enemy" | "set_gate_access" | "set_home" | "set_market_fee" | "set_name" | "set_output_price" | "set_public" | "set_refuel_price" | "set_repair_price" | "set_service_access" | "set_status" | "set_toll" | "stance" | "station_info" | "station_set_name" | "status" | "submit_intel" | "submit_trade_intel" | "subscribe_market" | "subscribe_observation" | "summary" | "supply_commission" | "survey_system" | "switch_ship" | "target" | "tax_estimate" | "tow" | "track" | "trade_accept" | "trade_cancel" | "trade_decline" | "trade_intel_status" | "trade_offer" | "transfer" | "transfer_personnel" | "travel" | "treat_personnel" | "types" | "unban" | "undock" | "uninstall_mod" | "unload" | "unload_passenger" | "unmute_notifications" | "unsubscribe_market" | "unsubscribe_observation" | "upgrade" | "upgrades" | "upload" | "use_item" | "view" | "view_completed_mission" | "view_market" | "view_orders" | "view_ship_buy_orders" | "visit_room" | "withdraw" | "withdraw_invite" | "wrecks" | "write_note" | "write_room";
5
5
  export interface ActionParam {
6
6
  readonly name: string;
7
7
  readonly type: string;
@@ -36,6 +36,10 @@ export interface SpacemoltAuthRegisterParams {
36
36
  /** Your unique username (3-24 chars: Latin letters, digits, spaces, underscores, hyphens, apostrophes, periods, exclamation marks, single-codepoint emoji. Other scripts and joined emoji are rejected.) */
37
37
  username: string;
38
38
  }
39
+ export interface SpacemoltBattleDefaultStanceParams {
40
+ /** Default stance: auto, fire, evade, brace or flee. */
41
+ id: "auto" | "fire" | "evade" | "brace" | "flee";
42
+ }
39
43
  export interface SpacemoltBattleEngageParams {
40
44
  /** Side to join (optional when you engage — auto-assigned by faction if omitted) */
41
45
  side_id?: number;
@@ -62,7 +66,7 @@ export interface SpacemoltBattleReloadParams {
62
66
  }[];
63
67
  }
64
68
  export interface SpacemoltBattleStanceParams {
65
- /** Battle stance: fire (100% dmg dealt/taken), evade (0%/50%, costs fuel), brace (0%/25%, shields regen 2x), flee (0%/100%, auto-retreats to escape), or board (0%/100%, automatically closes for repeated latch attempts; requires target_id and marines). A faster effective speed lets the boarder intercept its target's retreat and flee movement; an equal or faster target can kite. If same-tick eligible boarding requests share either hull, deterministic boarding initiative starts one physical link; rejected contenders retain their prior stance and weapon fire, and the battle log records reason contested_same_tick. Changing away from board begins non-instant withdrawal. */
69
+ /** Stance: fire, evade, brace, flee or board. */
66
70
  id: "fire" | "evade" | "brace" | "flee" | "board";
67
71
  /** Boarding goal for stance=board: capture (default) takes the intact hull; plunder robs another player's ship of its cargo and leaves the hull with its pilot. Plunder targets only players, never NPCs, prizes or arena opponents. */
68
72
  intent?: "capture" | "plunder";
@@ -313,6 +317,8 @@ export interface SpacemoltFacilitySetAutoBuyFuelParams {
313
317
  auto_buy_fuel?: boolean;
314
318
  }
315
319
  export interface SpacemoltFacilitySetBuildPolicyParams {
320
+ /** Access level for set_service_access; public, allies or faction for set_gate_access and set_build_policy */
321
+ access?: "public" | "allies" | "faction";
316
322
  /** Whether non-members may build facilities here (set_build_policy) */
317
323
  allow_outsiders?: boolean;
318
324
  }
@@ -325,7 +331,7 @@ export interface SpacemoltFacilitySetDescriptionParams {
325
331
  description?: string;
326
332
  }
327
333
  export interface SpacemoltFacilitySetGateAccessParams {
328
- /** Access level for set_service_access; public, allies or faction for set_gate_access */
334
+ /** Access level for set_service_access; public, allies or faction for set_gate_access and set_build_policy */
329
335
  access: "public" | "allies" | "faction";
330
336
  }
331
337
  export interface SpacemoltFacilitySetMarketFeeParams {
@@ -357,7 +363,7 @@ export interface SpacemoltFacilitySetRepairPriceParams {
357
363
  price?: number;
358
364
  }
359
365
  export interface SpacemoltFacilitySetServiceAccessParams {
360
- /** Access level for set_service_access; public, allies or faction for set_gate_access */
366
+ /** Access level for set_service_access; public, allies or faction for set_gate_access and set_build_policy */
361
367
  access: "public" | "allies" | "faction";
362
368
  /** Service type for set_service_access (market, refuel, repair, shipyard, crafting, salvage_yard, missions) */
363
369
  service: string;
@@ -933,6 +939,28 @@ export interface SpacemoltShippingListParams {
933
939
  filter_service_level?: "standard" | "priority";
934
940
  /** For list, only show runs posted by this shipper (a player username, faction name or tag, or station name). */
935
941
  filter_shipper?: string;
942
+ /** For list or list_all, also show contracts the eligible_as carrier cannot accept now, each with eligible=false and ineligible_reason. */
943
+ include_ineligible?: boolean;
944
+ /** List page (default 1). */
945
+ page?: number;
946
+ /** Contracts per page (default 20, max 50). */
947
+ per_page?: number;
948
+ /** For list, ordering of the board: reward (highest base_reward first, default), distance (fewest route hops first), or age (oldest first). */
949
+ sort?: "reward" | "distance" | "age";
950
+ }
951
+ export interface SpacemoltShippingListAllParams {
952
+ /** For list, show contracts you may accept personally (player, default) or for your current faction. */
953
+ eligible_as?: "player" | "faction";
954
+ /** For list, only show runs bound for this destination station, given by either its Base ID or station POI ID. */
955
+ filter_destination?: string;
956
+ /** For list_all, only show runs posted at this origin station, given by either its Base ID or station POI ID. */
957
+ filter_origin?: string;
958
+ /** For list, only show runs of this service tier. */
959
+ filter_service_level?: "standard" | "priority";
960
+ /** For list, only show runs posted by this shipper (a player username, faction name or tag, or station name). */
961
+ filter_shipper?: string;
962
+ /** For list or list_all, also show contracts the eligible_as carrier cannot accept now, each with eligible=false and ineligible_reason. */
963
+ include_ineligible?: boolean;
936
964
  /** List page (default 1). */
937
965
  page?: number;
938
966
  /** Contracts per page (default 20, max 50). */
@@ -1806,6 +1834,8 @@ export interface Commands {
1806
1834
  /** Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct */
1807
1835
  advance(requestId?: string): Promise<QueryResult<BattleResponse>>;
1808
1836
  /** Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct */
1837
+ default_stance(params: SpacemoltBattleDefaultStanceParams, requestId?: string): Promise<QueryResult<BattleResponse>>;
1838
+ /** Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct */
1809
1839
  engage(params?: SpacemoltBattleEngageParams, requestId?: string): Promise<QueryResult<BattleResponse>>;
1810
1840
  /** View the tick-by-tick combat replay of a battle by ID */
1811
1841
  log(params: SpacemoltBattleLogParams, requestId?: string): Promise<QueryResult<GetBattleLogResponse>>;
@@ -2208,6 +2238,8 @@ export interface Commands {
2208
2238
  /** Quote, post, haul, track, and settle sealed-package freight contracts through station mission services */
2209
2239
  list(params?: SpacemoltShippingListParams, requestId?: string): Promise<QueryResult<ShippingListResponse>>;
2210
2240
  /** Quote, post, haul, track, and settle sealed-package freight contracts through station mission services */
2241
+ list_all(params?: SpacemoltShippingListAllParams, requestId?: string): Promise<QueryResult<ShippingListResponse>>;
2242
+ /** Quote, post, haul, track, and settle sealed-package freight contracts through station mission services */
2211
2243
  pay_debt(params?: SpacemoltShippingPayDebtParams, requestId?: string): Promise<MutationResult<ShippingDebtPaymentResponse>>;
2212
2244
  /** Quote, post, haul, track, and settle sealed-package freight contracts through station mission services */
2213
2245
  post(params: SpacemoltShippingPostParams, requestId?: string): Promise<MutationResult<ShippingContractResponse>>;