@spacemolt/lib 15.2.1 → 16.1.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
@@ -78,7 +78,7 @@ var STATE_SECTIONS = [
78
78
  "prize_recoveries"
79
79
  ];
80
80
  // src/generated/actions.gen.ts
81
- var GENERATED_SPEC_VERSION = "v0.613.4";
81
+ var GENERATED_SPEC_VERSION = "v0.630.0";
82
82
  var ACTIONS = {
83
83
  "spacemolt_arena/accept": {
84
84
  tool: "spacemolt_arena",
@@ -1127,6 +1127,14 @@ var ACTIONS = {
1127
1127
  { name: "id", type: "string", required: true, description: "ID of the faction mission template to cancel", positional: 0 }
1128
1128
  ]
1129
1129
  },
1130
+ "spacemolt_faction/cancel_mobile_base_jump": {
1131
+ tool: "spacemolt_faction",
1132
+ action: "cancel_mobile_base_jump",
1133
+ kind: "mutation",
1134
+ summary: "Cancel a faction mobile-base jump during preparation",
1135
+ detailsType: "FactionMobileBaseResponse",
1136
+ params: []
1137
+ },
1130
1138
  "spacemolt_faction/create": {
1131
1139
  tool: "spacemolt_faction",
1132
1140
  action: "create",
@@ -1159,6 +1167,14 @@ var ACTIONS = {
1159
1167
  { name: "id", type: "string", required: true, description: "Faction ID to decline invitation from", positional: 0 }
1160
1168
  ]
1161
1169
  },
1170
+ "spacemolt_faction/decommission_mobile_base": {
1171
+ tool: "spacemolt_faction",
1172
+ action: "decommission_mobile_base",
1173
+ kind: "mutation",
1174
+ summary: "Permanently decommission an empty faction mobile base",
1175
+ detailsType: "DecommissionMobileBaseResponse",
1176
+ params: []
1177
+ },
1162
1178
  "spacemolt_faction/delete_role": {
1163
1179
  tool: "spacemolt_faction",
1164
1180
  action: "delete_role",
@@ -1195,6 +1211,14 @@ var ACTIONS = {
1195
1211
  responseType: "FactionGetInvitesResponse",
1196
1212
  params: []
1197
1213
  },
1214
+ "spacemolt_faction/get_mobile_base": {
1215
+ tool: "spacemolt_faction",
1216
+ action: "get_mobile_base",
1217
+ kind: "query",
1218
+ summary: "Inspect your faction's mobile base and its movement state",
1219
+ responseType: "FactionMobileBaseResponse",
1220
+ params: []
1221
+ },
1198
1222
  "spacemolt_faction/info": {
1199
1223
  tool: "spacemolt_faction",
1200
1224
  action: "info",
@@ -1227,6 +1251,16 @@ var ACTIONS = {
1227
1251
  { name: "id", type: "string", required: true, description: "UUID of faction to join (must have pending invite)", positional: 0 }
1228
1252
  ]
1229
1253
  },
1254
+ "spacemolt_faction/jump_mobile_base": {
1255
+ tool: "spacemolt_faction",
1256
+ action: "jump_mobile_base",
1257
+ kind: "mutation",
1258
+ summary: "Prepare an inter-system jump for your faction mobile base",
1259
+ detailsType: "FactionMobileBaseResponse",
1260
+ params: [
1261
+ { name: "id", type: "string", required: true, description: "Adjacent destination system personally known by the commander", positional: 0 }
1262
+ ]
1263
+ },
1230
1264
  "spacemolt_faction/kick": {
1231
1265
  tool: "spacemolt_faction",
1232
1266
  action: "kick",
@@ -1264,6 +1298,17 @@ var ACTIONS = {
1264
1298
  responseType: "FactionListMissionsResponse",
1265
1299
  params: []
1266
1300
  },
1301
+ "spacemolt_faction/move_mobile_base": {
1302
+ tool: "spacemolt_faction",
1303
+ action: "move_mobile_base",
1304
+ kind: "mutation",
1305
+ summary: "Move your faction mobile base to new coordinates in its current system",
1306
+ detailsType: "FactionMobileBaseResponse",
1307
+ params: [
1308
+ { name: "x", type: "number", required: true, description: "Destination X coordinate in AU (within 10 AU of system center)" },
1309
+ { name: "y", type: "number", required: true, description: "Destination Y coordinate in AU (within 10 AU of system center)" }
1310
+ ]
1311
+ },
1267
1312
  "spacemolt_faction/prepay_tax": {
1268
1313
  tool: "spacemolt_faction",
1269
1314
  action: "prepay_tax",
@@ -2266,6 +2311,29 @@ var ACTIONS = {
2266
2311
  { name: "target", type: "string", required: true, description: "UUID of thread to delete", positional: 0 }
2267
2312
  ]
2268
2313
  },
2314
+ "spacemolt_social/forum_edit_reply": {
2315
+ tool: "spacemolt_social",
2316
+ action: "forum_edit_reply",
2317
+ kind: "query",
2318
+ summary: "Edit your forum reply",
2319
+ responseType: "ForumEditReplyResponse",
2320
+ params: [
2321
+ { name: "content", type: "string", required: true, description: "Replacement reply text: 5–5000 bytes after sanitization.", positional: 1 },
2322
+ { name: "target", type: "string", required: true, description: "UUID of your reply in an unlocked thread to edit", positional: 0 }
2323
+ ]
2324
+ },
2325
+ "spacemolt_social/forum_edit_thread": {
2326
+ tool: "spacemolt_social",
2327
+ action: "forum_edit_thread",
2328
+ kind: "query",
2329
+ summary: "Edit your forum thread",
2330
+ responseType: "ForumEditThreadResponse",
2331
+ params: [
2332
+ { name: "content", type: "string", required: false, description: "Replacement body: 10–100000 bytes after sanitization. Omit to keep the current body. Supply title or content or both.", positional: 1 },
2333
+ { name: "target", type: "string", required: true, description: "UUID of your unlocked thread to edit", positional: 0 },
2334
+ { name: "title", type: "string", required: false, description: "Replacement title: 5–100 bytes after sanitization. Omit to keep the current title.", positional: 2 }
2335
+ ]
2336
+ },
2269
2337
  "spacemolt_social/forum_get_thread": {
2270
2338
  tool: "spacemolt_social",
2271
2339
  action: "forum_get_thread",
@@ -2331,7 +2399,7 @@ var ACTIONS = {
2331
2399
  { name: "faction_id", type: "string", required: false, description: "View a faction's action log instead of your own (must be a member)" },
2332
2400
  { name: "page", type: "number", required: false, description: "Page number (default 1). Ignored when since_id is set." },
2333
2401
  { name: "page_size", type: "number", required: false, description: "Entries per page, or max entries to return when since_id is set (default 50, max 100)" },
2334
- { name: "since_id", type: "number", required: false, description: "Cursor for gap-free incremental polling: return only entries with id greater than this, oldest-first, up to page_size. Pass 0 or omit for normal newest-first paging. Pass the response's next_since_id on your next poll to continue exactly where you left off." }
2402
+ { name: "since_id", type: "number", required: false, description: "Positive cursor: return entries with greater IDs in ascending ID order, up to page_size. Pass 0 or omit for newest-first paging. Pass next_since_id on the next poll; keep the current cursor if it is absent. If archive reads fail, the request returns an error; retry the same since_id. Concurrent writes can appear later with lower IDs, so use recent page-based history to reconcile missed entries." }
2335
2403
  ]
2336
2404
  },
2337
2405
  "spacemolt_social/get_chat_history": {
@@ -2374,7 +2442,7 @@ var ACTIONS = {
2374
2442
  summary: "Mute notification channels for real-time WebSocket pushes",
2375
2443
  responseType: "NotificationSettingsResponse",
2376
2444
  params: [
2377
- { name: "channels", type: "string[]", required: true, description: 'Notification channels to mute for WebSocket pushes (e.g. ["chat.system", "battle_alerts"]; see get_notification_settings for the catalog)' }
2445
+ { name: "channels", type: "string[]", required: true, description: 'Notification channels to mute for WebSocket pushes; exchange_fills starts muted and while muted is sent on no transport (e.g. ["chat.system", "battle_alerts"]; see get_notification_settings for the catalog)' }
2378
2446
  ]
2379
2447
  },
2380
2448
  "spacemolt_social/petition": {
@@ -2879,7 +2947,7 @@ var ACTIONS = {
2879
2947
  tool: "spacemolt",
2880
2948
  action: "get_system",
2881
2949
  kind: "query",
2882
- summary: "Get your current system details",
2950
+ summary: "Get your current system's chart: charted POIs and connections. With a ship scanner, each POI also carries ship_count",
2883
2951
  responseType: "GetSystemCommandResponse",
2884
2952
  params: []
2885
2953
  },
@@ -2887,7 +2955,7 @@ var ACTIONS = {
2887
2955
  tool: "spacemolt",
2888
2956
  action: "get_system_agents",
2889
2957
  kind: "query",
2890
- summary: "Get all uncloaked online players in your current system",
2958
+ summary: "DEPRECATED: always returns an empty list. Use get_nearby for the ships at your POI and get_system with a ship scanner for ship counts at the other POIs",
2891
2959
  responseType: "GetSystemAgentsResponse",
2892
2960
  params: []
2893
2961
  },
@@ -3069,7 +3137,7 @@ var ACTIONS = {
3069
3137
  summary: "Scan a target, or sweep the area for cloaked ships when no target is given",
3070
3138
  detailsType: "ScanResponse",
3071
3139
  params: [
3072
- { name: "id", type: "string", required: false, description: "Player ID/username, NPC ID/name, wildlife creature ID, or intact-prize actor ID to scan. Prize actor IDs come from get_nearby. Omit to run an area sensor sweep that reveals cloaked ships at your location your scanner out-powers.", positional: 0 }
3140
+ { name: "id", type: "string", required: false, description: "Player ID/username, NPC ID/name, wildlife creature ID, or intact-prize actor ID to scan. Prize actor IDs come from get_nearby. A charted POI ID (or station base ID) in your system runs a remote POI scan of every ship there; it needs a ship scanner and loses 10 power away from your own POI. Omit to run an area sensor sweep that reveals cloaked ships at your location your scanner out-powers.", positional: 0 }
3073
3141
  ]
3074
3142
  },
3075
3143
  "spacemolt/search_systems": {
@@ -3106,7 +3174,7 @@ var ACTIONS = {
3106
3174
  tool: "spacemolt",
3107
3175
  action: "subscribe_observation",
3108
3176
  kind: "query",
3109
- summary: "Subscribe to live presence updates at your current POI and system",
3177
+ summary: "Subscribe to live presence updates for the players at your POI, plus ship_counts for the other POIs with a ship scanner",
3110
3178
  responseType: "SubscribeObservationResponse",
3111
3179
  params: [
3112
3180
  { name: "active_scan", type: "boolean", required: false, description: "Also run a continuous active sensor sweep that resolves cloaked ships (requires a scanner, must be undocked, burns 1 fuel/tick, alerts cloakers). Omit or false for the passive presence feed only." }
@@ -3116,7 +3184,7 @@ var ACTIONS = {
3116
3184
  tool: "spacemolt",
3117
3185
  action: "survey_system",
3118
3186
  kind: "mutation",
3119
- summary: "Scan for hidden deep core deposits in the current system",
3187
+ summary: "Read ore across the current system and scan for hidden POIs",
3120
3188
  detailsType: "SurveySystemResponse",
3121
3189
  params: []
3122
3190
  },
@@ -3365,20 +3433,25 @@ function buildCommands(dispatch) {
3365
3433
  accept_invite: bind("spacemolt_faction", "accept_invite"),
3366
3434
  accept_peace: bind("spacemolt_faction", "accept_peace"),
3367
3435
  cancel_mission: bind("spacemolt_faction", "cancel_mission"),
3436
+ cancel_mobile_base_jump: bindBare("spacemolt_faction", "cancel_mobile_base_jump"),
3368
3437
  create: bind("spacemolt_faction", "create"),
3369
3438
  declare_war: bind("spacemolt_faction", "declare_war"),
3370
3439
  decline_invite: bind("spacemolt_faction", "decline_invite"),
3440
+ decommission_mobile_base: bindBare("spacemolt_faction", "decommission_mobile_base"),
3371
3441
  delete_role: bind("spacemolt_faction", "delete_role"),
3372
3442
  delete_room: bind("spacemolt_faction", "delete_room"),
3373
3443
  garages: bindBare("spacemolt_faction", "garages"),
3374
3444
  get_invites: bindBare("spacemolt_faction", "get_invites"),
3445
+ get_mobile_base: bindBare("spacemolt_faction", "get_mobile_base"),
3375
3446
  info: bind("spacemolt_faction", "info"),
3376
3447
  invite: bind("spacemolt_faction", "invite"),
3377
3448
  join: bind("spacemolt_faction", "join"),
3449
+ jump_mobile_base: bind("spacemolt_faction", "jump_mobile_base"),
3378
3450
  kick: bind("spacemolt_faction", "kick"),
3379
3451
  leave: bindBare("spacemolt_faction", "leave"),
3380
3452
  list: bind("spacemolt_faction", "list"),
3381
3453
  list_missions: bindBare("spacemolt_faction", "list_missions"),
3454
+ move_mobile_base: bind("spacemolt_faction", "move_mobile_base"),
3382
3455
  prepay_tax: bind("spacemolt_faction", "prepay_tax"),
3383
3456
  propose_ally: bind("spacemolt_faction", "propose_ally"),
3384
3457
  propose_peace: bind("spacemolt_faction", "propose_peace"),
@@ -3499,6 +3572,8 @@ function buildCommands(dispatch) {
3499
3572
  forum_create_thread: bind("spacemolt_social", "forum_create_thread"),
3500
3573
  forum_delete_reply: bind("spacemolt_social", "forum_delete_reply"),
3501
3574
  forum_delete_thread: bind("spacemolt_social", "forum_delete_thread"),
3575
+ forum_edit_reply: bind("spacemolt_social", "forum_edit_reply"),
3576
+ forum_edit_thread: bind("spacemolt_social", "forum_edit_thread"),
3502
3577
  forum_get_thread: bind("spacemolt_social", "forum_get_thread"),
3503
3578
  forum_list: bind("spacemolt_social", "forum_list"),
3504
3579
  forum_reply: bind("spacemolt_social", "forum_reply"),
@@ -3867,11 +3942,13 @@ class ObservationCache {
3867
3942
  system_id: snapshot.system_id,
3868
3943
  tick: 0,
3869
3944
  nearby: indexBy(snapshot.nearby, (p) => p.player_id),
3870
- system: indexBy(snapshot.system_agents, (p) => p.player_id),
3871
3945
  pirates: indexBy(snapshot.pirates, (p) => p.pirate_id),
3872
3946
  empireNpcs: indexBy(snapshot.empire_npcs, (n) => n.npc_id),
3873
3947
  creatures: indexBy(snapshot.creatures, (c) => c.creature_id),
3874
3948
  prizes: indexBy(snapshot.prizes, (p) => p.prize_id),
3949
+ arenaNpcs: indexBy(snapshot.arena_npcs, (n) => n.npc_id),
3950
+ offlineCollapsed: snapshot.offline_collapsed ?? 0,
3951
+ shipCounts: new Map(Object.entries(snapshot.ship_counts ?? {})),
3875
3952
  cloaked: indexBy(snapshot.cloaked_contacts, (c) => c.target_id),
3876
3953
  unknownSignature: snapshot.unknown_signature ?? false,
3877
3954
  activeScan: snapshot.active_scan ?? false
@@ -3885,11 +3962,13 @@ class ObservationCache {
3885
3962
  system_id: update.system_id,
3886
3963
  tick: update.tick,
3887
3964
  nearby: new Map,
3888
- system: new Map,
3889
3965
  pirates: new Map,
3890
3966
  empireNpcs: new Map,
3891
3967
  creatures: new Map,
3892
3968
  prizes: new Map,
3969
+ arenaNpcs: new Map,
3970
+ offlineCollapsed: 0,
3971
+ shipCounts: new Map,
3893
3972
  cloaked: new Map,
3894
3973
  unknownSignature: false,
3895
3974
  activeScan: false
@@ -3898,12 +3977,16 @@ class ObservationCache {
3898
3977
  const v = this.view;
3899
3978
  v.tick = update.tick;
3900
3979
  merge(v.nearby, update.nearby_changed, update.nearby_departed, (p) => p.player_id);
3901
- merge(v.system, update.system_changed, update.system_departed, (p) => p.player_id);
3902
3980
  merge(v.pirates, update.pirates_changed, update.pirates_departed, (p) => p.pirate_id);
3903
3981
  merge(v.empireNpcs, update.empire_npcs_changed, update.empire_npcs_departed, (n) => n.npc_id);
3904
3982
  merge(v.creatures, update.creatures_changed, update.creatures_departed, (c) => c.creature_id);
3905
3983
  merge(v.prizes, update.prizes_changed, update.prizes_departed, (p) => p.prize_id);
3984
+ merge(v.arenaNpcs, update.arena_npcs_changed, update.arena_npcs_departed, (n) => n.npc_id);
3906
3985
  merge(v.cloaked, update.cloaked_resolved, update.cloaked_lost, (c) => c.target_id);
3986
+ if (update.offline_collapsed !== undefined)
3987
+ v.offlineCollapsed = update.offline_collapsed;
3988
+ if (update.ship_counts !== undefined)
3989
+ v.shipCounts = new Map(Object.entries(update.ship_counts));
3907
3990
  if (update.unknown_signature !== undefined)
3908
3991
  v.unknownSignature = update.unknown_signature;
3909
3992
  if (update.active_scan !== undefined)
@@ -4211,6 +4294,7 @@ var ARRIVED = {
4211
4294
  nearby_pirate_count: undefined,
4212
4295
  nearby_empire_npcs: undefined,
4213
4296
  nearby_empire_npc_count: undefined,
4297
+ nearby_leviathans: undefined,
4214
4298
  offline_collapsed: undefined,
4215
4299
  unknown_signature: undefined
4216
4300
  };
@@ -4660,48 +4744,17 @@ class Account {
4660
4744
  const view = this.observationCache.current();
4661
4745
  if (!view)
4662
4746
  return;
4663
- const nearbyPlayers = [...view.nearby.entries()].map(([playerId, p]) => ({
4664
- player_id: playerId,
4665
- in_combat: p.in_combat ?? false,
4666
- ...p.clan_tag !== undefined && { clan_tag: p.clan_tag },
4667
- ...p.faction_tag !== undefined && { faction_tag: p.faction_tag },
4668
- ...p.offline !== undefined && { offline: p.offline },
4669
- ...p.ship_class !== undefined && { ship_class: p.ship_class },
4670
- ...p.ship_name !== undefined && { ship_name: p.ship_name },
4671
- ...p.username !== undefined && { username: p.username }
4672
- }));
4673
- const nearbyPirates = [...view.pirates.values()].map((p) => ({
4674
- pirate_id: p.pirate_id,
4675
- name: p.name,
4676
- tier: p.tier,
4677
- is_boss: p.is_boss,
4678
- status: p.status,
4679
- hull: p.hull ?? 0,
4680
- max_hull: p.max_hull ?? 0,
4681
- shield: p.shield ?? 0,
4682
- max_shield: p.max_shield ?? 0,
4683
- ...p.faction !== undefined && { faction: p.faction },
4684
- ...p.faction_name !== undefined && { faction_name: p.faction_name }
4685
- }));
4686
- const nearbyEmpireNpcs = [...view.empireNpcs.values()].map((n) => ({
4687
- npc_id: n.npc_id,
4688
- name: n.name,
4689
- role: n.role,
4690
- empire: n.empire,
4691
- in_combat: n.in_combat,
4692
- ...n.fleet_name !== undefined && { fleet_name: n.fleet_name },
4693
- ...n.ship_class !== undefined && { ship_class: n.ship_class },
4694
- ...n.ship_name !== undefined && { ship_name: n.ship_name }
4695
- }));
4747
+ const nearbyPlayers = [...view.nearby.values()].sort((a, b) => Number(a.offline ?? false) - Number(b.offline ?? false) || (a.username < b.username ? -1 : a.username > b.username ? 1 : 0));
4696
4748
  const changed = this.cache.patchSection("location", {
4697
4749
  nearby_players: nearbyPlayers,
4698
- nearby_player_count: view.nearby.size,
4699
- nearby_pirates: nearbyPirates,
4750
+ nearby_player_count: nearbyPlayers.length,
4751
+ nearby_pirates: [...view.pirates.values()],
4700
4752
  nearby_pirate_count: view.pirates.size,
4701
- nearby_empire_npcs: nearbyEmpireNpcs,
4753
+ nearby_empire_npcs: [...view.empireNpcs.values()],
4702
4754
  nearby_empire_npc_count: view.empireNpcs.size,
4703
4755
  nearby_prizes: [...view.prizes.values()],
4704
4756
  nearby_prize_count: view.prizes.size,
4757
+ offline_collapsed: view.offlineCollapsed,
4705
4758
  unknown_signature: view.unknownSignature
4706
4759
  });
4707
4760
  if (changed.length)
@@ -5773,11 +5826,13 @@ var TYPED_NOTIFICATION_TYPES = [
5773
5826
  "drone_survey",
5774
5827
  "drone_update",
5775
5828
  "error",
5829
+ "exchange_fill",
5776
5830
  "facility_reclaimed",
5777
5831
  "facility_rent_warning",
5778
5832
  "faction_alliance_broken",
5779
5833
  "faction_alliance_formed",
5780
5834
  "faction_alliance_proposal",
5835
+ "faction_mobile_base_update",
5781
5836
  "faction_peace_accepted",
5782
5837
  "faction_peace_proposal",
5783
5838
  "faction_war_declared",
@@ -5893,5 +5948,5 @@ export {
5893
5948
  retryAfterMsFromClose
5894
5949
  };
5895
5950
 
5896
- //# debugId=8D56E4D2B9F2FAB164756E2164756E21
5951
+ //# debugId=0A3B7036C5742F3A64756E2164756E21
5897
5952
  //# sourceMappingURL=index.js.map