@spacemolt/lib 13.1.1 → 13.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/dist/index.js CHANGED
@@ -45,8 +45,69 @@ var STATE_SECTIONS = [
45
45
  "prize_recoveries"
46
46
  ];
47
47
  // src/generated/actions.gen.ts
48
- var GENERATED_SPEC_VERSION = "v0.578.1";
48
+ var GENERATED_SPEC_VERSION = "v0.590.0";
49
49
  var ACTIONS = {
50
+ "spacemolt_arena/accept": {
51
+ tool: "spacemolt_arena",
52
+ action: "accept",
53
+ kind: "mutation",
54
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
55
+ detailsType: "ArenaAcceptResponse",
56
+ params: []
57
+ },
58
+ "spacemolt_arena/cancel": {
59
+ tool: "spacemolt_arena",
60
+ action: "cancel",
61
+ kind: "mutation",
62
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
63
+ detailsType: "ArenaActionResponse",
64
+ params: []
65
+ },
66
+ "spacemolt_arena/challenge": {
67
+ tool: "spacemolt_arena",
68
+ action: "challenge",
69
+ kind: "mutation",
70
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
71
+ detailsType: "ArenaChallengeResponse",
72
+ params: [
73
+ { name: "id", type: "string", required: true, description: "Player name or ID to challenge (for 'challenge')", positional: 0 },
74
+ { name: "max_side_size", type: "number", required: false, description: "For 'challenge': maximum ships per side. 0 (default) lets every eligible fleet member at the arena join; 1 is a solo duel." }
75
+ ]
76
+ },
77
+ "spacemolt_arena/challenges": {
78
+ tool: "spacemolt_arena",
79
+ action: "challenges",
80
+ kind: "query",
81
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
82
+ responseType: "ArenaChallengesResponse",
83
+ params: []
84
+ },
85
+ "spacemolt_arena/decline": {
86
+ tool: "spacemolt_arena",
87
+ action: "decline",
88
+ kind: "mutation",
89
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
90
+ detailsType: "ArenaActionResponse",
91
+ params: []
92
+ },
93
+ "spacemolt_arena/fight": {
94
+ tool: "spacemolt_arena",
95
+ action: "fight",
96
+ kind: "mutation",
97
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
98
+ detailsType: "ArenaFightResponse",
99
+ params: [
100
+ { name: "id", type: "string", required: true, description: "For 'fight': the NPC challenge to start, from 'challenges'.", positional: 0 }
101
+ ]
102
+ },
103
+ "spacemolt_arena/status": {
104
+ tool: "spacemolt_arena",
105
+ action: "status",
106
+ kind: "query",
107
+ summary: "Consequence-free combat at an arena POI: challenge a pilot, fight on the normal battle engine, leave with ship and crew intact",
108
+ responseType: "ArenaStatusResponse",
109
+ params: []
110
+ },
50
111
  "spacemolt_auth/claim": {
51
112
  tool: "spacemolt_auth",
52
113
  action: "claim",
@@ -181,9 +242,9 @@ var ACTIONS = {
181
242
  summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
182
243
  responseType: "BattleResponse",
183
244
  params: [
184
- { name: "id", type: '"fire" | "evade" | "brace" | "flee" | "board"', required: true, description: "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). Changing away from board begins non-instant withdrawal.", enumValues: ["fire", "evade", "brace", "flee", "board"], positional: 0 },
245
+ { name: "id", type: '"fire" | "evade" | "brace" | "flee" | "board"', required: true, description: "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.", enumValues: ["fire", "evade", "brace", "flee", "board"], positional: 0 },
185
246
  { name: "marines", type: "number", required: false, description: "Positive fit-marine commitment required when setting stance=board. The battle tick caps it to the fit marines actually available." },
186
- { name: "target", type: "string", required: false, description: "ID or name of the enemy — required when focusing a target and when entering the board stance", positional: 1 }
247
+ { name: "target", type: "string", required: false, description: "ID or name of the enemy — required when focusing a target and when entering the board stance. Board attempts against creatures, drones, and stations are rejected immediately because they are not capturable.", positional: 1 }
187
248
  ]
188
249
  },
189
250
  "spacemolt_battle/status": {
@@ -211,7 +272,7 @@ var ACTIONS = {
211
272
  summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
212
273
  responseType: "BattleResponse",
213
274
  params: [
214
- { name: "id", type: "string", required: true, description: "ID or name of the enemy — required when focusing a target and when entering the board stance", positional: 0 }
275
+ { name: "id", type: "string", required: true, description: "ID or name of the enemy — required when focusing a target and when entering the board stance. Board attempts against creatures, drones, and stations are rejected immediately because they are not capturable.", positional: 0 }
215
276
  ]
216
277
  },
217
278
  "spacemolt_citizenship/apply": {
@@ -1531,7 +1592,7 @@ var ACTIONS = {
1531
1592
  responseType: "ViewMarketResponse",
1532
1593
  params: [
1533
1594
  { name: "category", type: "string", required: false, description: "Optional: filter summary by category (e.g., ore, commodity, weapon, module). Use without item_id." },
1534
- { name: "company_store", type: "boolean", required: false, description: "Optional: show ONLY your faction's private Company Store listings (members-only buy/sell orders, hidden from non-members). Requires faction membership." },
1595
+ { name: "company_store", type: "boolean", required: false, description: "Optional: narrow the response to ONLY your faction's private Company Store listings. They already appear in the normal view alongside public orders; other factions' are never visible. Requires faction membership." },
1535
1596
  { name: "item_id", type: "string", required: false, description: "Optional: filter to a specific item for full order book depth (e.g., iron_ore)", positional: 0 },
1536
1597
  { name: "since", type: "number", required: false, description: "Optional: a prior current_tick. Returns only items whose book changed at or after that tick (incremental poll) instead of a full snapshot. Re-baseline (omit since) after changing stations or on a 'stale_cursor' error." }
1537
1598
  ]
@@ -1622,7 +1683,7 @@ var ACTIONS = {
1622
1683
  tool: "spacemolt_salvage",
1623
1684
  action: "sell",
1624
1685
  kind: "mutation",
1625
- summary: "Sell a towed wreck to the salvage yard for credits",
1686
+ summary: "Sell a towed wreck to an NPC salvage yard for credits",
1626
1687
  detailsType: "SellWreckResponse",
1627
1688
  params: []
1628
1689
  },
@@ -2497,7 +2558,7 @@ var ACTIONS = {
2497
2558
  summary: "Attack another player, pirate, empire NPC, creature, station, or intact prize",
2498
2559
  detailsType: "AttackResponse",
2499
2560
  params: [
2500
- { name: "id", type: "string", required: true, description: "ID of the target: a player, pirate, empire NPC, wildlife creature, intact-prize actor, or station. Prize actor IDs come from get_nearby. Opening fire on a station starts a siege; shelling an empire station is a serious crime.", positional: 0 }
2561
+ { name: "id", type: "string", required: true, description: "ID of the target: a player, pirate, empire NPC, wildlife creature, intact-prize actor, or station. Prize actor IDs come from get_nearby. Reciprocal player attacks submitted for the same tick are each classified from tick-start state as independent aggression, so both attackers may receive crime, bounty, and reputation penalties. Opening fire on a station starts a siege; shelling an empire station is a serious crime.", positional: 0 }
2501
2562
  ]
2502
2563
  },
2503
2564
  "spacemolt/buy": {
@@ -3164,6 +3225,15 @@ function buildCommands(dispatch) {
3164
3225
  use_item: bind("spacemolt", "use_item"),
3165
3226
  view_completed_mission: bind("spacemolt", "view_completed_mission")
3166
3227
  },
3228
+ spacemolt_arena: {
3229
+ accept: bindBare("spacemolt_arena", "accept"),
3230
+ cancel: bindBare("spacemolt_arena", "cancel"),
3231
+ challenge: bind("spacemolt_arena", "challenge"),
3232
+ challenges: bindBare("spacemolt_arena", "challenges"),
3233
+ decline: bindBare("spacemolt_arena", "decline"),
3234
+ fight: bind("spacemolt_arena", "fight"),
3235
+ status: bindBare("spacemolt_arena", "status")
3236
+ },
3167
3237
  spacemolt_auth: {
3168
3238
  claim: bind("spacemolt_auth", "claim"),
3169
3239
  login: bind("spacemolt_auth", "login"),
@@ -4817,10 +4887,10 @@ class Account {
4817
4887
  return;
4818
4888
  this.reconnecting = true;
4819
4889
  const cfg = this.reconnectConfig;
4820
- const retryAfterMs2 = retryAfterMsFromClose(err);
4890
+ const retryAfterMs = retryAfterMsFromClose(err);
4821
4891
  for (let attempt = 1;attempt <= cfg.maxRetries; attempt++) {
4822
4892
  this.notifyListeners(this.reconnectingListeners, "onReconnecting", attempt);
4823
- const backoff = attempt === 1 && retryAfterMs2 !== undefined ? retryAfterMs2 : Math.min(cfg.baseDelayMs * 2 ** (attempt - 1), cfg.maxDelayMs);
4893
+ const backoff = attempt === 1 && retryAfterMs !== undefined ? retryAfterMs : Math.min(cfg.baseDelayMs * 2 ** (attempt - 1), cfg.maxDelayMs);
4824
4894
  await delay(backoff);
4825
4895
  if (this.userClosing) {
4826
4896
  this.reconnecting = false;
@@ -5193,8 +5263,8 @@ class SpacemoltClient {
5193
5263
  } catch (err) {
5194
5264
  lastErr = err;
5195
5265
  if (i < retry.maxRetries) {
5196
- const retryAfterMs2 = retryAfterMsFromClose(err);
5197
- await delay2(retryAfterMs2 ?? Math.min(retry.baseDelayMs * 2 ** i, retry.maxDelayMs));
5266
+ const retryAfterMs = retryAfterMsFromClose(err);
5267
+ await delay2(retryAfterMs ?? Math.min(retry.baseDelayMs * 2 ** i, retry.maxDelayMs));
5198
5268
  }
5199
5269
  }
5200
5270
  }
@@ -5402,6 +5472,7 @@ var TYPED_NOTIFICATION_TYPES = [
5402
5472
  "achievement_unlocked",
5403
5473
  "action_error",
5404
5474
  "action_result",
5475
+ "arena_challenge",
5405
5476
  "base_destroyed",
5406
5477
  "base_raid_update",
5407
5478
  "battle_alert",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spacemolt/lib",
3
- "version": "13.1.1",
3
+ "version": "13.3.0",
4
4
  "description": "The definitive TypeScript library for SpaceMolt. WebSocket-v2-first, multi-account, with local state caches. Internals are regenerated from the server's OpenAPI spec.",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",