@spacemolt/lib 12.2.2 → 13.0.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 +34 -26
- package/README.md +8 -2
- package/dist/account.d.ts +17 -0
- package/dist/data/catalog.d.ts +25 -5
- package/dist/data/map.d.ts +12 -11
- package/dist/data/mobile-base.d.ts +13 -0
- package/dist/data/stations.d.ts +10 -0
- package/dist/generated/actions.gen.d.ts +2 -2
- package/dist/generated/commands.gen.d.ts +166 -71
- package/dist/generated/notifications.gen.d.ts +14 -3
- package/dist/generated/openapi/types.gen.d.ts +2085 -717
- package/dist/index.d.ts +2 -1
- package/dist/index.js +304 -113
- package/dist/protocol.d.ts +33 -26
- package/dist/state/cache.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,10 +41,11 @@ var STATE_SECTIONS = [
|
|
|
41
41
|
"location",
|
|
42
42
|
"missions",
|
|
43
43
|
"queue",
|
|
44
|
-
"skills"
|
|
44
|
+
"skills",
|
|
45
|
+
"prize_recoveries"
|
|
45
46
|
];
|
|
46
47
|
// src/generated/actions.gen.ts
|
|
47
|
-
var GENERATED_SPEC_VERSION = "v0.
|
|
48
|
+
var GENERATED_SPEC_VERSION = "v0.574.0";
|
|
48
49
|
var ACTIONS = {
|
|
49
50
|
"spacemolt_auth/claim": {
|
|
50
51
|
tool: "spacemolt_auth",
|
|
@@ -119,7 +120,7 @@ var ACTIONS = {
|
|
|
119
120
|
tool: "spacemolt_battle",
|
|
120
121
|
action: "advance",
|
|
121
122
|
kind: "query",
|
|
122
|
-
summary: "Manage your battle —
|
|
123
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
123
124
|
responseType: "BattleResponse",
|
|
124
125
|
params: []
|
|
125
126
|
},
|
|
@@ -127,10 +128,10 @@ var ACTIONS = {
|
|
|
127
128
|
tool: "spacemolt_battle",
|
|
128
129
|
action: "engage",
|
|
129
130
|
kind: "query",
|
|
130
|
-
summary: "Manage your battle —
|
|
131
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
131
132
|
responseType: "BattleResponse",
|
|
132
133
|
params: [
|
|
133
|
-
{ name: "side_id", type: "number", required: false, description: "Side to join (optional
|
|
134
|
+
{ name: "side_id", type: "number", required: false, description: "Side to join (optional when you engage — auto-assigned by faction if omitted)" }
|
|
134
135
|
]
|
|
135
136
|
},
|
|
136
137
|
"spacemolt_battle/log": {
|
|
@@ -161,7 +162,15 @@ var ACTIONS = {
|
|
|
161
162
|
tool: "spacemolt_battle",
|
|
162
163
|
action: "retreat",
|
|
163
164
|
kind: "query",
|
|
164
|
-
summary: "Manage your battle —
|
|
165
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
166
|
+
responseType: "BattleResponse",
|
|
167
|
+
params: []
|
|
168
|
+
},
|
|
169
|
+
"spacemolt_battle/self_destruct": {
|
|
170
|
+
tool: "spacemolt_battle",
|
|
171
|
+
action: "self_destruct",
|
|
172
|
+
kind: "query",
|
|
173
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
165
174
|
responseType: "BattleResponse",
|
|
166
175
|
params: []
|
|
167
176
|
},
|
|
@@ -169,10 +178,12 @@ var ACTIONS = {
|
|
|
169
178
|
tool: "spacemolt_battle",
|
|
170
179
|
action: "stance",
|
|
171
180
|
kind: "query",
|
|
172
|
-
summary: "Manage your battle —
|
|
181
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
173
182
|
responseType: "BattleResponse",
|
|
174
183
|
params: [
|
|
175
|
-
{ name: "id", type: '"fire" | "evade" | "brace" | "flee"', required: true, description: "Battle stance
|
|
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 },
|
|
185
|
+
{ 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 }
|
|
176
187
|
]
|
|
177
188
|
},
|
|
178
189
|
"spacemolt_battle/status": {
|
|
@@ -197,10 +208,10 @@ var ACTIONS = {
|
|
|
197
208
|
tool: "spacemolt_battle",
|
|
198
209
|
action: "target",
|
|
199
210
|
kind: "query",
|
|
200
|
-
summary: "Manage your battle —
|
|
211
|
+
summary: "Manage your battle — maneuver, target enemies, adopt combat stances, or self-destruct",
|
|
201
212
|
responseType: "BattleResponse",
|
|
202
213
|
params: [
|
|
203
|
-
{ name: "id", type: "string", required: true, description: "
|
|
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 }
|
|
204
215
|
]
|
|
205
216
|
},
|
|
206
217
|
"spacemolt_citizenship/apply": {
|
|
@@ -920,7 +931,7 @@ var ACTIONS = {
|
|
|
920
931
|
{ name: "expiration_hours", type: "number", required: false, description: "Hours before mission expires (default 72, max 720)" },
|
|
921
932
|
{ name: "giver_name", type: "string", required: false, description: "Optional: NPC name who gives the mission" },
|
|
922
933
|
{ name: "giver_title", type: "string", required: false, description: "Optional: NPC title" },
|
|
923
|
-
{ name: "objectives", type: "{ description: string; item_id?: string; quantity?: number; system_id?: string; target_id?: string; type: string }[]", required: true, description: "List of mission objectives" },
|
|
934
|
+
{ name: "objectives", type: "{ description: string; item_id?: string; quantity?: number; system_id?: string; target_base_id?: string; target_id?: string; type: string }[]", required: true, description: "List of mission objectives" },
|
|
924
935
|
{ name: "rewards", type: "{ credits?: number; items?: Record<string, unknown>[] }", required: true, description: "Mission rewards (credits, items, reputation)" },
|
|
925
936
|
{ name: "title", type: "string", required: true, description: "Mission title" },
|
|
926
937
|
{ name: "triggers", type: "string[]", required: false, description: "Optional: triggers like 'open_to_all' to allow non-members" },
|
|
@@ -1193,7 +1204,7 @@ var ACTIONS = {
|
|
|
1193
1204
|
tool: "spacemolt_faction",
|
|
1194
1205
|
action: "remove_ally",
|
|
1195
1206
|
kind: "mutation",
|
|
1196
|
-
summary: "Dissolve an alliance with another faction",
|
|
1207
|
+
summary: "Dissolve an alliance or clear pending alliance proposals with another faction",
|
|
1197
1208
|
detailsType: "FactionRemoveAllyResponse",
|
|
1198
1209
|
params: [
|
|
1199
1210
|
{ name: "id", type: "string", required: true, description: "Target faction ID or 4-character faction tag (e.g. NOVA)", positional: 0 }
|
|
@@ -1381,7 +1392,7 @@ var ACTIONS = {
|
|
|
1381
1392
|
summary: "Search your faction's market price database, or an allied faction's",
|
|
1382
1393
|
responseType: "FactionQueryTradeIntelResponse",
|
|
1383
1394
|
params: [
|
|
1384
|
-
{ name: "base_id", type: "string", required: false, description: "Filter by
|
|
1395
|
+
{ name: "base_id", type: "string", required: false, description: "Filter by station Base ID or station POI ID" },
|
|
1385
1396
|
{ name: "item_id", type: "string", required: false, description: "Filter by item ID (requires L2 Commerce Terminal)", positional: 1 },
|
|
1386
1397
|
{ name: "limit", type: "number", required: false, description: "Max results (default 20, max 50)" },
|
|
1387
1398
|
{ name: "offset", type: "number", required: false, description: "Pagination offset" },
|
|
@@ -1396,7 +1407,7 @@ var ACTIONS = {
|
|
|
1396
1407
|
summary: "Run a long-range sensor scan of a POI from your faction's sensor facility",
|
|
1397
1408
|
detailsType: "FactionScanPoiResponse",
|
|
1398
1409
|
params: [
|
|
1399
|
-
{ name: "poi_id", type: "string", required: true, description: "ID of the POI to scan. The faction's sensor facility must be in range (L1 same system, L2 one jump, L3 two jumps).", positional: 2 }
|
|
1410
|
+
{ name: "poi_id", type: "string", required: true, description: "ID of the POI to scan; for a station, either its POI ID or Base ID is accepted. The faction's sensor facility must be in range (L1 same system, L2 one jump, L3 two jumps).", positional: 2 }
|
|
1400
1411
|
]
|
|
1401
1412
|
},
|
|
1402
1413
|
"spacemolt_intel/submit_intel": {
|
|
@@ -1539,7 +1550,19 @@ var ACTIONS = {
|
|
|
1539
1550
|
{ name: "scope", type: '"personal" | "faction"', required: false, description: "Order scope: 'personal' (default) or 'faction' (requires faction membership)", enumValues: ["personal", "faction"] },
|
|
1540
1551
|
{ name: "search", type: "string", required: false, description: "Filter by substring match on item names" },
|
|
1541
1552
|
{ name: "sort_by", type: '"newest" | "oldest" | "price_asc" | "price_desc"', required: false, description: "Sort order: 'newest' (default), 'oldest', 'price_asc', 'price_desc'", enumValues: ["newest", "oldest", "price_asc", "price_desc"] },
|
|
1542
|
-
{ name: "station_id", type: "string", required: false, description: "Optional: station ID to view your orders at without being docked. If omitted, must be docked and uses the current station." }
|
|
1553
|
+
{ name: "station_id", type: "string", required: false, description: "Optional: station Base ID or station POI ID to view your orders at without being docked. If omitted, must be docked and uses the current station." }
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1556
|
+
"spacemolt_salvage/claim_prize": {
|
|
1557
|
+
tool: "spacemolt_salvage",
|
|
1558
|
+
action: "claim_prize",
|
|
1559
|
+
kind: "mutation",
|
|
1560
|
+
summary: "Assign prize crew and begin recovery of an intact captured ship",
|
|
1561
|
+
detailsType: "ClaimPrizeResponse",
|
|
1562
|
+
params: [
|
|
1563
|
+
{ name: "crew_disposition", type: '"aboard" | "faction_reserve"', required: false, description: "Where surviving assigned crew go on delivery. Defaults to aboard; faction_reserve requires and reserves capacity in your faction's destination reserve.", enumValues: ["aboard", "faction_reserve"] },
|
|
1564
|
+
{ name: "id", type: "string", required: true, description: "Intact prize record ID at your current POI", positional: 0 },
|
|
1565
|
+
{ name: "target", type: "string", required: true, description: "Accessible station base ID where the autonomous prize should recover" }
|
|
1543
1566
|
]
|
|
1544
1567
|
},
|
|
1545
1568
|
"spacemolt_salvage/insure": {
|
|
@@ -1603,6 +1626,19 @@ var ACTIONS = {
|
|
|
1603
1626
|
detailsType: "SellWreckResponse",
|
|
1604
1627
|
params: []
|
|
1605
1628
|
},
|
|
1629
|
+
"spacemolt_salvage/service_prize": {
|
|
1630
|
+
tool: "spacemolt_salvage",
|
|
1631
|
+
action: "service_prize",
|
|
1632
|
+
kind: "mutation",
|
|
1633
|
+
summary: "Stop, resume, redirect, refuel, or repair a claimed intact prize",
|
|
1634
|
+
detailsType: "PrizeServiceResponse",
|
|
1635
|
+
params: [
|
|
1636
|
+
{ name: "id", type: "string", required: true, description: "Claimed intact prize record ID at your current POI", positional: 0 },
|
|
1637
|
+
{ name: "quantity", type: "number", required: false, description: "Optional quantity. For refuel, zero or omission transfers the safe maximum; for repair, zero or omission uses one repair kit." },
|
|
1638
|
+
{ name: "service_action", type: '"stop" | "resume" | "redirect" | "refuel" | "repair"', required: true, description: "Physical recovery action to perform", enumValues: ["stop", "resume", "redirect", "refuel", "repair"] },
|
|
1639
|
+
{ name: "target", type: "string", required: false, description: "Accessible replacement station for redirect" }
|
|
1640
|
+
]
|
|
1641
|
+
},
|
|
1606
1642
|
"spacemolt_salvage/set_home": {
|
|
1607
1643
|
tool: "spacemolt_salvage",
|
|
1608
1644
|
action: "set_home",
|
|
@@ -1638,7 +1674,7 @@ var ACTIONS = {
|
|
|
1638
1674
|
summary: "Browse ships listed for sale at a base",
|
|
1639
1675
|
responseType: "BrowseShipsResponse",
|
|
1640
1676
|
params: [
|
|
1641
|
-
{ name: "base_id", type: "string", required: false, description: "
|
|
1677
|
+
{ name: "base_id", type: "string", required: false, description: "Station to browse listings at, given by either its Base ID or station POI ID (defaults to current station)" },
|
|
1642
1678
|
{ name: "class_id", type: "string", required: false, description: "Filter by ship class ID" },
|
|
1643
1679
|
{ name: "max_price", type: "number", required: false, description: "Maximum price filter" }
|
|
1644
1680
|
]
|
|
@@ -1690,7 +1726,9 @@ var ACTIONS = {
|
|
|
1690
1726
|
summary: "Get a cost estimate for commissioning a ship",
|
|
1691
1727
|
responseType: "CommissionQuoteResponse",
|
|
1692
1728
|
params: [
|
|
1693
|
-
{ name: "
|
|
1729
|
+
{ name: "bare_hull", type: "boolean", required: false, description: "If true, quote the hull without its default module loadout." },
|
|
1730
|
+
{ name: "id", type: "string", required: true, description: "Ship class ID to get a quote for", positional: 0 },
|
|
1731
|
+
{ name: "source_missing_materials", type: "boolean", required: false, description: "Preview the materials you can contribute, the remaining deficit, and partial-sourcing total." }
|
|
1694
1732
|
]
|
|
1695
1733
|
},
|
|
1696
1734
|
"spacemolt_ship/commission_ship": {
|
|
@@ -1700,9 +1738,11 @@ var ACTIONS = {
|
|
|
1700
1738
|
summary: "Commission a ship to be built at this shipyard",
|
|
1701
1739
|
detailsType: "CommissionShipResponse",
|
|
1702
1740
|
params: [
|
|
1741
|
+
{ name: "bare_hull", type: "boolean", required: false, description: "If true, commission only the hull without its default module loadout. Defaults to false so ships arrive fitted." },
|
|
1703
1742
|
{ name: "fund_from_faction", type: "boolean", required: false, description: "At your own faction's station: build from faction storage and treasury (requires ManageTreasury). Required there; credits-only and provide_materials are rejected." },
|
|
1704
1743
|
{ name: "id", type: "string", required: true, description: "Ship class ID to commission (use ship_catalog to see options)", positional: 0 },
|
|
1705
|
-
{ name: "provide_materials", type: "boolean", required: false, description: "At an empire/NPC shipyard: if true, supply build materials from cargo/storage (cheaper); if false, pay credits for everything (default)." }
|
|
1744
|
+
{ name: "provide_materials", type: "boolean", required: false, description: "At an empire/NPC shipyard: if true, supply build materials from cargo/storage (cheaper); if false, pay credits for everything (default)." },
|
|
1745
|
+
{ name: "source_missing_materials", type: "boolean", required: false, description: "At an empire/NPC shipyard: take available requirements from cargo then station storage and charge only to source the deficit. Do not combine with provide_materials." }
|
|
1706
1746
|
]
|
|
1707
1747
|
},
|
|
1708
1748
|
"spacemolt_ship/commission_status": {
|
|
@@ -1712,7 +1752,21 @@ var ACTIONS = {
|
|
|
1712
1752
|
summary: "Check the status of your ship commissions",
|
|
1713
1753
|
responseType: "CommissionStatusResponse",
|
|
1714
1754
|
params: [
|
|
1715
|
-
{ name: "base_id", type: "string", required: false, description: "Optional: filter commissions to a
|
|
1755
|
+
{ name: "base_id", type: "string", required: false, description: "Optional: filter commissions to a station by either its Base ID or station POI ID" }
|
|
1756
|
+
]
|
|
1757
|
+
},
|
|
1758
|
+
"spacemolt_ship/faction_personnel": {
|
|
1759
|
+
tool: "spacemolt_ship",
|
|
1760
|
+
action: "faction_personnel",
|
|
1761
|
+
kind: "mutation",
|
|
1762
|
+
summary: "View, recruit, or transfer personnel held in your faction's local reserve",
|
|
1763
|
+
detailsType: "FactionPersonnelResponse",
|
|
1764
|
+
params: [
|
|
1765
|
+
{ name: "fit_crew", type: "number", required: false },
|
|
1766
|
+
{ name: "fit_marines", type: "number", required: false },
|
|
1767
|
+
{ name: "injured_crew", type: "number", required: false },
|
|
1768
|
+
{ name: "injured_marines", type: "number", required: false },
|
|
1769
|
+
{ name: "personnel_action", type: '"status" | "recruit" | "deposit" | "withdraw"', required: false, description: "Reserve operation; defaults to status. On v2 transports this field is named personnel_action.", enumValues: ["status", "recruit", "deposit", "withdraw"] }
|
|
1716
1770
|
]
|
|
1717
1771
|
},
|
|
1718
1772
|
"spacemolt_ship/list_ship_for_sale": {
|
|
@@ -1742,9 +1796,17 @@ var ACTIONS = {
|
|
|
1742
1796
|
detailsType: "ShippingContractResponse",
|
|
1743
1797
|
params: [
|
|
1744
1798
|
{ name: "carrier", type: '"player" | "faction"', required: false, description: "Prime carrier accepting the contract: you personally (player, default) or your current faction. The selected actor permanently owns the consequences. Self-shipping bypasses standing and tier liability limits but earns no carrier reputation; unpaid freight debt still blocks acceptance.", enumValues: ["player", "faction"] },
|
|
1745
|
-
{ name: "shipment_id", type: "string", required: true, description: "Freight contract ID for get, track, accept, deliver, return, or cancel." }
|
|
1799
|
+
{ name: "shipment_id", type: "string", required: true, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1746
1800
|
]
|
|
1747
1801
|
},
|
|
1802
|
+
"spacemolt_shipping/active": {
|
|
1803
|
+
tool: "spacemolt_shipping",
|
|
1804
|
+
action: "active",
|
|
1805
|
+
kind: "query",
|
|
1806
|
+
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1807
|
+
responseType: "ShippingActiveResponse",
|
|
1808
|
+
params: []
|
|
1809
|
+
},
|
|
1748
1810
|
"spacemolt_shipping/cancel": {
|
|
1749
1811
|
tool: "spacemolt_shipping",
|
|
1750
1812
|
action: "cancel",
|
|
@@ -1752,7 +1814,7 @@ var ACTIONS = {
|
|
|
1752
1814
|
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1753
1815
|
detailsType: "ShippingSettlementResponse",
|
|
1754
1816
|
params: [
|
|
1755
|
-
{ name: "shipment_id", type: "string", required: true, description: "Freight contract ID for get, track, accept, deliver, return, or cancel." }
|
|
1817
|
+
{ name: "shipment_id", type: "string", required: true, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1756
1818
|
]
|
|
1757
1819
|
},
|
|
1758
1820
|
"spacemolt_shipping/deliver": {
|
|
@@ -1762,7 +1824,8 @@ var ACTIONS = {
|
|
|
1762
1824
|
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1763
1825
|
detailsType: "ShippingSettlementResponse",
|
|
1764
1826
|
params: [
|
|
1765
|
-
{ name: "
|
|
1827
|
+
{ name: "package_id", type: "string", required: false, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1828
|
+
{ name: "shipment_id", type: "string", required: false, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1766
1829
|
]
|
|
1767
1830
|
},
|
|
1768
1831
|
"spacemolt_shipping/get": {
|
|
@@ -1772,7 +1835,8 @@ var ACTIONS = {
|
|
|
1772
1835
|
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1773
1836
|
responseType: "ShippingContractResponse",
|
|
1774
1837
|
params: [
|
|
1775
|
-
{ name: "
|
|
1838
|
+
{ name: "package_id", type: "string", required: false, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1839
|
+
{ name: "shipment_id", type: "string", required: false, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1776
1840
|
]
|
|
1777
1841
|
},
|
|
1778
1842
|
"spacemolt_shipping/list": {
|
|
@@ -1783,7 +1847,7 @@ var ACTIONS = {
|
|
|
1783
1847
|
responseType: "ShippingListResponse",
|
|
1784
1848
|
params: [
|
|
1785
1849
|
{ name: "eligible_as", type: '"player" | "faction"', required: false, description: "For list, show contracts you may accept personally (player, default) or for your current faction.", enumValues: ["player", "faction"] },
|
|
1786
|
-
{ name: "filter_destination", type: "string", required: false, description: "For list, only show runs bound for this destination station
|
|
1850
|
+
{ name: "filter_destination", type: "string", required: false, description: "For list, only show runs bound for this destination station, given by either its Base ID or station POI ID." },
|
|
1787
1851
|
{ name: "filter_service_level", type: '"standard" | "priority"', required: false, description: "For list, only show runs of this service tier.", enumValues: ["standard", "priority"] },
|
|
1788
1852
|
{ name: "filter_shipper", type: "string", required: false, description: "For list, only show runs posted by this shipper (a player username, faction name or tag, or station name)." },
|
|
1789
1853
|
{ name: "page", type: "number", required: false, description: "List page (default 1)." },
|
|
@@ -1809,14 +1873,14 @@ var ACTIONS = {
|
|
|
1809
1873
|
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1810
1874
|
detailsType: "ShippingContractResponse",
|
|
1811
1875
|
params: [
|
|
1812
|
-
{ name: "base_reward", type: "number", required:
|
|
1813
|
-
{ name: "destination_base_id", type: "string", required: true, description: "Destination station
|
|
1876
|
+
{ name: "base_reward", type: "number", required: true, description: "Flat reward paid to the carrier on delivery. You set the price — required to post (post fails with reward_required if omitted or non-positive). quote returns estimated_reward from recently-completed similar-distance contracts to guide you; there is no automatic distance-based rate." },
|
|
1877
|
+
{ name: "destination_base_id", type: "string", required: true, description: "Destination station for quote or post, given as either a station's base ID or the station POI ID the map shows you. It must differ from the origin station; another station in the same system is valid." },
|
|
1814
1878
|
{ name: "insured", type: "boolean", required: false, description: "Request cargo insurance. Unpriceable packages may still be shipped uninsured." },
|
|
1815
1879
|
{ name: "invited_carrier_id", type: "string", required: false, description: "Invited player or faction ID when visibility=invited." },
|
|
1816
1880
|
{ name: "invited_carrier_type", type: '"player" | "faction"', required: false, description: "Invited prime carrier kind when visibility=invited.", enumValues: ["player", "faction"] },
|
|
1817
1881
|
{ name: "max_total_cost", type: "number", required: false, description: "Optional post guard. The contract is rejected if the recomputed fees, reward escrow, and premium exceed this amount." },
|
|
1818
|
-
{ name: "package_id", type: "string", required: true, description: "Sealed package
|
|
1819
|
-
{ name: "recipient_id", type: "string", required: false, description: "Player, faction, or station ID matching recipient_type." },
|
|
1882
|
+
{ name: "package_id", type: "string", required: true, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1883
|
+
{ name: "recipient_id", type: "string", required: false, description: "Player, faction, or station ID matching recipient_type; a station takes either the base ID or the station POI ID." },
|
|
1820
1884
|
{ name: "recipient_type", type: '"player" | "faction" | "station"', required: false, description: "Delivery beneficiary kind. Omit both recipient fields to deliver back to the shipper.", enumValues: ["player", "faction", "station"] },
|
|
1821
1885
|
{ name: "service_level", type: '"standard" | "priority"', required: false, description: "Delivery timing tier only: standard, or priority for a tighter deadline. It does not set any payment — the carrier's pay is base_reward plus the optional speed_bonus.", enumValues: ["standard", "priority"] },
|
|
1822
1886
|
{ name: "shipper", type: '"player" | "faction"', required: false, description: "Who posts and funds the contract: you personally (player, default) or your current faction. Faction posting requires manage_treasury.", enumValues: ["player", "faction"] },
|
|
@@ -1844,12 +1908,12 @@ var ACTIONS = {
|
|
|
1844
1908
|
responseType: "ShippingQuoteResponse",
|
|
1845
1909
|
params: [
|
|
1846
1910
|
{ name: "base_reward", type: "number", required: false, description: "Flat reward paid to the carrier on delivery. You set the price — required to post (post fails with reward_required if omitted or non-positive). quote returns estimated_reward from recently-completed similar-distance contracts to guide you; there is no automatic distance-based rate." },
|
|
1847
|
-
{ name: "destination_base_id", type: "string", required: true, description: "Destination station
|
|
1911
|
+
{ name: "destination_base_id", type: "string", required: true, description: "Destination station for quote or post, given as either a station's base ID or the station POI ID the map shows you. It must differ from the origin station; another station in the same system is valid." },
|
|
1848
1912
|
{ name: "insured", type: "boolean", required: false, description: "Request cargo insurance. Unpriceable packages may still be shipped uninsured." },
|
|
1849
1913
|
{ name: "invited_carrier_id", type: "string", required: false, description: "Invited player or faction ID when visibility=invited." },
|
|
1850
1914
|
{ name: "invited_carrier_type", type: '"player" | "faction"', required: false, description: "Invited prime carrier kind when visibility=invited.", enumValues: ["player", "faction"] },
|
|
1851
|
-
{ name: "package_id", type: "string", required: true, description: "Sealed package
|
|
1852
|
-
{ name: "recipient_id", type: "string", required: false, description: "Player, faction, or station ID matching recipient_type." },
|
|
1915
|
+
{ name: "package_id", type: "string", required: true, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1916
|
+
{ name: "recipient_id", type: "string", required: false, description: "Player, faction, or station ID matching recipient_type; a station takes either the base ID or the station POI ID." },
|
|
1853
1917
|
{ name: "recipient_type", type: '"player" | "faction" | "station"', required: false, description: "Delivery beneficiary kind. Omit both recipient fields to deliver back to the shipper.", enumValues: ["player", "faction", "station"] },
|
|
1854
1918
|
{ name: "service_level", type: '"standard" | "priority"', required: false, description: "Delivery timing tier only: standard, or priority for a tighter deadline. It does not set any payment — the carrier's pay is base_reward plus the optional speed_bonus.", enumValues: ["standard", "priority"] },
|
|
1855
1919
|
{ name: "shipper", type: '"player" | "faction"', required: false, description: "Who posts and funds the contract: you personally (player, default) or your current faction. Faction posting requires manage_treasury.", enumValues: ["player", "faction"] },
|
|
@@ -1866,7 +1930,8 @@ var ACTIONS = {
|
|
|
1866
1930
|
summary: "Quote, post, haul, track, and settle sealed-package freight contracts through station mission services",
|
|
1867
1931
|
detailsType: "ShippingSettlementResponse",
|
|
1868
1932
|
params: [
|
|
1869
|
-
{ name: "
|
|
1933
|
+
{ name: "package_id", type: "string", required: false, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1934
|
+
{ name: "shipment_id", type: "string", required: false, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1870
1935
|
]
|
|
1871
1936
|
},
|
|
1872
1937
|
"spacemolt_shipping/track": {
|
|
@@ -1877,7 +1942,8 @@ var ACTIONS = {
|
|
|
1877
1942
|
responseType: "ShippingTrackResponse",
|
|
1878
1943
|
params: [
|
|
1879
1944
|
{ name: "limit", type: "number", required: false, description: "Maximum recent beacon events returned by track." },
|
|
1880
|
-
{ name: "
|
|
1945
|
+
{ name: "package_id", type: "string", required: false, description: "Sealed package ID, either the bare package ID or the package:<id> cargo item form. For quote/post it is the freight to ship, owned by the selected shipper at this station. For get, track, deliver, and return it identifies the contract by the sealed box you are holding, instead of shipment_id." },
|
|
1946
|
+
{ name: "shipment_id", type: "string", required: false, description: "Freight contract ID for get, track, accept, deliver, return, or cancel. get, track, deliver, and return also accept a package ID here, or in package_id." }
|
|
1881
1947
|
]
|
|
1882
1948
|
},
|
|
1883
1949
|
"spacemolt_ship/place_ship_buy_order": {
|
|
@@ -1891,6 +1957,17 @@ var ACTIONS = {
|
|
|
1891
1957
|
{ name: "price", type: "number", required: true, description: "Offered price in credits (escrowed with sales tax until filled or cancelled)" }
|
|
1892
1958
|
]
|
|
1893
1959
|
},
|
|
1960
|
+
"spacemolt_ship/recruit_personnel": {
|
|
1961
|
+
tool: "spacemolt_ship",
|
|
1962
|
+
action: "recruit_personnel",
|
|
1963
|
+
kind: "mutation",
|
|
1964
|
+
summary: "Recruit fit crew and marines at a station personnel service",
|
|
1965
|
+
detailsType: "RecruitPersonnelResponse",
|
|
1966
|
+
params: [
|
|
1967
|
+
{ name: "crew", type: "number", required: false, description: "Fit crew to recruit into the active ship. Request crew and/or marines; at least one count must be positive." },
|
|
1968
|
+
{ name: "marines", type: "number", required: false, description: "Fit marines to recruit into the active ship. Request crew and/or marines; at least one count must be positive." }
|
|
1969
|
+
]
|
|
1970
|
+
},
|
|
1894
1971
|
"spacemolt_ship/refit_ship": {
|
|
1895
1972
|
tool: "spacemolt_ship",
|
|
1896
1973
|
action: "refit_ship",
|
|
@@ -1952,6 +2029,34 @@ var ACTIONS = {
|
|
|
1952
2029
|
{ name: "id", type: "string", required: true, description: "ID of the ship to switch to (must be stored at current station, use list_ships to see your fleet)", positional: 0 }
|
|
1953
2030
|
]
|
|
1954
2031
|
},
|
|
2032
|
+
"spacemolt_ship/transfer_personnel": {
|
|
2033
|
+
tool: "spacemolt_ship",
|
|
2034
|
+
action: "transfer_personnel",
|
|
2035
|
+
kind: "mutation",
|
|
2036
|
+
summary: "Transfer fit or injured crew and marines to an allied ship at the same POI",
|
|
2037
|
+
detailsType: "TransferPersonnelResponse",
|
|
2038
|
+
params: [
|
|
2039
|
+
{ name: "fit_crew", type: "number", required: false },
|
|
2040
|
+
{ name: "fit_marines", type: "number", required: false },
|
|
2041
|
+
{ name: "id", type: "string", required: true, description: "Allied player ID or username at the same POI.", positional: 0 },
|
|
2042
|
+
{ name: "injured_crew", type: "number", required: false },
|
|
2043
|
+
{ name: "injured_marines", type: "number", required: false }
|
|
2044
|
+
]
|
|
2045
|
+
},
|
|
2046
|
+
"spacemolt_ship/treat_personnel": {
|
|
2047
|
+
tool: "spacemolt_ship",
|
|
2048
|
+
action: "treat_personnel",
|
|
2049
|
+
kind: "mutation",
|
|
2050
|
+
summary: "Treat injured crew and marines at a station or with an onboard medical module",
|
|
2051
|
+
detailsType: "TreatPersonnelResponse",
|
|
2052
|
+
params: [
|
|
2053
|
+
{ name: "crew", type: "number", required: false, description: "Injured crew to treat. Omit or use zero to treat as many as possible." },
|
|
2054
|
+
{ name: "id", type: "string", required: false, description: "Optional allied player ID or username for remote field treatment. Omit to treat your active ship or faction reserve.", positional: 0 },
|
|
2055
|
+
{ name: "marines", type: "number", required: false, description: "Injured marines to treat. Omit or use zero to treat as many as possible." },
|
|
2056
|
+
{ name: "provider", type: '"station" | "field" | "faction"', required: false, description: "Treatment source. Omit to choose the appropriate local station or field provider automatically.", enumValues: ["station", "field", "faction"] },
|
|
2057
|
+
{ name: "reserve", type: "boolean", required: false, description: "Treat personnel in the local faction reserve. Requires provider=faction and ManageTreasury permission." }
|
|
2058
|
+
]
|
|
2059
|
+
},
|
|
1955
2060
|
"spacemolt_ship/view_ship_buy_orders": {
|
|
1956
2061
|
tool: "spacemolt_ship",
|
|
1957
2062
|
action: "view_ship_buy_orders",
|
|
@@ -2249,15 +2354,15 @@ var ACTIONS = {
|
|
|
2249
2354
|
summary: "Unified storage: view, deposit, withdraw items for self/faction; credit transfers for faction treasury; gift items/credits/ships to players",
|
|
2250
2355
|
detailsType: "DepositItemsResponse | FactionGarageStoreResponse | TransferItemsResponse | TransferCreditsResponse | SendGiftResponse | GiftShipResponse | FactionGiftResponse | EmpireGiftResponse | FactionDepositItemsResponse | FactionDepositCreditsResponse | FactionDepositFuelResponse | BulkStorageResponse",
|
|
2251
2356
|
params: [
|
|
2252
|
-
{ name: "bucket", type: "string", required: false, description: "Optional (target=faction only): a Storage Extension bucket by name or id to deposit into / withdraw from instead of the main store. For an intra-faction move (source=faction target=faction) this is the SOURCE compartment. Empty means the main store. See bucket names in
|
|
2357
|
+
{ name: "bucket", type: "string", required: false, description: "Optional (target=faction only): a Storage Extension bucket by name or id to deposit into / withdraw from instead of the main store. For an intra-faction move (source=faction target=faction) this is the SOURCE compartment. Empty means the main store. See bucket names in a storage view with target=faction." },
|
|
2253
2358
|
{ name: "credits", type: "number", required: false, description: "For 'deposit' with target=<player name/id>: the amount of credits to gift that player. (Faction credit deposits use item_id='credits' with quantity instead.)" },
|
|
2254
2359
|
{ name: "dest_bucket", type: "string", required: false, description: "Optional destination compartment for an intra-faction move (source=faction target=faction): items go from 'bucket' into 'dest_bucket'. Either may be empty to mean the main store, so this covers main↔bucket and bucket↔bucket moves. Requires manage_treasury." },
|
|
2255
|
-
{ name: "item_id", type: "string", required: false, description: "Item ID for normal item transfers, 'credits' for credit operations (faction target only), or a stored ship instance UUID for ship operations: target=self loads/unloads the ship into your active carrier's bay, or — if your active ship is a non-carrier with a tow rig fitted — attaches/releases it as a tow (its class scale must be no larger than your active ship's), and target=<player_name>
|
|
2360
|
+
{ name: "item_id", type: "string", required: false, description: "Item ID for normal item transfers, 'credits' for credit operations (faction target only), or a stored ship instance UUID for ship operations: target=self loads/unloads the ship into your active carrier's bay, or — if your active ship is a non-carrier with a tow rig fitted — attaches/releases it as a tow (its class scale must be no larger than your active ship's), and target=<player_name> on a deposit gifts the ship (triggers gift_ship action). Use list_ships to find ship instance IDs.", positional: 1 },
|
|
2256
2361
|
{ name: "items", type: "{ item_id: string; quantity: number }[]", required: false, description: "Bulk deposit/withdraw: array of {item_id, quantity} objects moved in a single action (one write) instead of one per tick. Items only. Honors target/source like single-item (cargo↔personal, cargo↔faction, personal↔faction transfers, gifts). Omit item_id/quantity when using this. The response reports per-item success/failure." },
|
|
2257
2362
|
{ name: "message", type: "string", required: false, description: "Optional message when gifting to another player" },
|
|
2258
2363
|
{ name: "quantity", type: "number", required: false, description: "Amount to transfer", positional: 2 },
|
|
2259
2364
|
{ name: "source", type: "string", required: false, description: "Optional source for deposit/withdraw: 'cargo' (default — your ship's cargo hold or wallet), 'storage' (personal storage; use with target=faction or a player name to transfer directly, bypassing cargo), or 'faction' (faction storage; use with target=self to transfer faction→personal, or with target=faction to move items between faction compartments — both require manage_treasury)." },
|
|
2260
|
-
{ name: "target", type: "string", required: false, description: "Target:
|
|
2365
|
+
{ name: "target", type: "string", required: false, description: "Target: self, faction, faction:TAG, empire alias, player name/ID, or station:<base-or-POI-ID>. Station targets accept optional unpaid item donations via deposit only, including bulk items; dock at that managed NPC empire station. No credits, ships, packages, or quest items. Cargo works with storage offline; personal storage source requires storage service. Normal gift unlock and trading restrictions apply. Items enter manager station inventory, not empire reserves; paid treasury procurement remains primary.", positional: 0 }
|
|
2261
2366
|
]
|
|
2262
2367
|
},
|
|
2263
2368
|
"spacemolt_storage/jettison": {
|
|
@@ -2292,8 +2397,8 @@ var ACTIONS = {
|
|
|
2292
2397
|
summary: "Unified storage: view, deposit, withdraw items for self/faction; credit transfers for faction treasury; gift items/credits/ships to players",
|
|
2293
2398
|
responseType: "ViewStorageResponse | ViewFactionStorageResponse",
|
|
2294
2399
|
params: [
|
|
2295
|
-
{ name: "station_id", type: "string", required: false, description: 'Optional: station ID to view storage at without being docked.
|
|
2296
|
-
{ name: "target", type: "string", required: false, description: "Target:
|
|
2400
|
+
{ name: "station_id", type: "string", required: false, description: 'Optional: station Base ID or station POI ID to view storage at without being docked. Read-only: it applies to a storage view (target="self" or "faction"), not to a deposit or withdraw.' },
|
|
2401
|
+
{ name: "target", type: "string", required: false, description: "Target: self, faction, faction:TAG, empire alias, player name/ID, or station:<base-or-POI-ID>. Station targets accept optional unpaid item donations via deposit only, including bulk items; dock at that managed NPC empire station. No credits, ships, packages, or quest items. Cargo works with storage offline; personal storage source requires storage service. Normal gift unlock and trading restrictions apply. Items enter manager station inventory, not empire reserves; paid treasury procurement remains primary.", positional: 0 }
|
|
2297
2402
|
]
|
|
2298
2403
|
},
|
|
2299
2404
|
"spacemolt_storage/withdraw": {
|
|
@@ -2303,13 +2408,13 @@ var ACTIONS = {
|
|
|
2303
2408
|
summary: "Unified storage: view, deposit, withdraw items for self/faction; credit transfers for faction treasury; gift items/credits/ships to players",
|
|
2304
2409
|
detailsType: "WithdrawItemsResponse | TransferItemsResponse | TransferCreditsResponse | FactionWithdrawItemsResponse | FactionWithdrawCreditsResponse | BulkStorageResponse",
|
|
2305
2410
|
params: [
|
|
2306
|
-
{ name: "bucket", type: "string", required: false, description: "Optional (target=faction only): a Storage Extension bucket by name or id to deposit into / withdraw from instead of the main store. For an intra-faction move (source=faction target=faction) this is the SOURCE compartment. Empty means the main store. See bucket names in
|
|
2411
|
+
{ name: "bucket", type: "string", required: false, description: "Optional (target=faction only): a Storage Extension bucket by name or id to deposit into / withdraw from instead of the main store. For an intra-faction move (source=faction target=faction) this is the SOURCE compartment. Empty means the main store. See bucket names in a storage view with target=faction." },
|
|
2307
2412
|
{ name: "dest_bucket", type: "string", required: false, description: "Optional destination compartment for an intra-faction move (source=faction target=faction): items go from 'bucket' into 'dest_bucket'. Either may be empty to mean the main store, so this covers main↔bucket and bucket↔bucket moves. Requires manage_treasury." },
|
|
2308
|
-
{ name: "item_id", type: "string", required: false, description: "Item ID for normal item transfers, 'credits' for credit operations (faction target only), or a stored ship instance UUID for ship operations: target=self loads/unloads the ship into your active carrier's bay, or — if your active ship is a non-carrier with a tow rig fitted — attaches/releases it as a tow (its class scale must be no larger than your active ship's), and target=<player_name>
|
|
2413
|
+
{ name: "item_id", type: "string", required: false, description: "Item ID for normal item transfers, 'credits' for credit operations (faction target only), or a stored ship instance UUID for ship operations: target=self loads/unloads the ship into your active carrier's bay, or — if your active ship is a non-carrier with a tow rig fitted — attaches/releases it as a tow (its class scale must be no larger than your active ship's), and target=<player_name> on a deposit gifts the ship (triggers gift_ship action). Use list_ships to find ship instance IDs.", positional: 1 },
|
|
2309
2414
|
{ name: "items", type: "{ item_id: string; quantity: number }[]", required: false, description: "Bulk deposit/withdraw: array of {item_id, quantity} objects moved in a single action (one write) instead of one per tick. Items only. Honors target/source like single-item (cargo↔personal, cargo↔faction, personal↔faction transfers, gifts). Omit item_id/quantity when using this. The response reports per-item success/failure." },
|
|
2310
2415
|
{ name: "quantity", type: "number", required: false, description: "Amount to transfer", positional: 2 },
|
|
2311
2416
|
{ name: "source", type: "string", required: false, description: "Optional source for deposit/withdraw: 'cargo' (default — your ship's cargo hold or wallet), 'storage' (personal storage; use with target=faction or a player name to transfer directly, bypassing cargo), or 'faction' (faction storage; use with target=self to transfer faction→personal, or with target=faction to move items between faction compartments — both require manage_treasury)." },
|
|
2312
|
-
{ name: "target", type: "string", required: false, description: "Target:
|
|
2417
|
+
{ name: "target", type: "string", required: false, description: "Target: self, faction, faction:TAG, empire alias, player name/ID, or station:<base-or-POI-ID>. Station targets accept optional unpaid item donations via deposit only, including bulk items; dock at that managed NPC empire station. No credits, ships, packages, or quest items. Cargo works with storage offline; personal storage source requires storage service. Normal gift unlock and trading restrictions apply. Items enter manager station inventory, not empire reserves; paid treasury procurement remains primary.", positional: 0 }
|
|
2313
2418
|
]
|
|
2314
2419
|
},
|
|
2315
2420
|
"spacemolt_transfer/get_trades": {
|
|
@@ -2389,10 +2494,10 @@ var ACTIONS = {
|
|
|
2389
2494
|
tool: "spacemolt",
|
|
2390
2495
|
action: "attack",
|
|
2391
2496
|
kind: "mutation",
|
|
2392
|
-
summary: "Attack another player, pirate, empire NPC, creature, or
|
|
2497
|
+
summary: "Attack another player, pirate, empire NPC, creature, station, or intact prize",
|
|
2393
2498
|
detailsType: "AttackResponse",
|
|
2394
2499
|
params: [
|
|
2395
|
-
{ name: "id", type: "string", required: true, description: "ID of the target: a player, pirate, empire NPC, wildlife creature, or station. Opening fire on a station starts a siege; shelling an empire station is a serious crime.", positional: 0 }
|
|
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 }
|
|
2396
2501
|
]
|
|
2397
2502
|
},
|
|
2398
2503
|
"spacemolt/buy": {
|
|
@@ -2445,12 +2550,12 @@ var ACTIONS = {
|
|
|
2445
2550
|
detailsType: "CraftCommandResponse",
|
|
2446
2551
|
params: [
|
|
2447
2552
|
{ name: "count", type: "number", required: false, description: "Alias for quantity (used when quantity is not set)." },
|
|
2448
|
-
{ name: "deliver_to", type: "string", required: false, description: "Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific faction Storage Extension bucket." },
|
|
2553
|
+
{ name: "deliver_to", type: "string", required: false, description: "Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific faction Storage Extension bucket. Pass it alongside job_id to redirect an ALREADY QUEUED job's remaining output there instead of queuing anything new." },
|
|
2449
2554
|
{ name: "dry_run", type: "boolean", required: false, description: "Return a cost+time quote (materials, labor, rental fee, auto-routed venue, ETA) without queuing or spending anything. Not supported with bulk jobs." },
|
|
2450
2555
|
{ name: "facility_id", type: "string", required: false, description: "Route to a specific facility ID (overrides auto-selection)." },
|
|
2451
2556
|
{ name: "id", type: "string", required: false, description: "Recipe ID to craft (use catalog with type=recipes to see available recipes). Inputs are escrowed from station storage at enqueue.", positional: 0 },
|
|
2452
2557
|
{ name: "items", type: "{ item_id: string; quantity: number }[]", required: false, description: "For pack_package: selected items to pack; total unpacked size may not exceed 100." },
|
|
2453
|
-
{ name: "job_id", type: "string", required: false, description: "
|
|
2558
|
+
{ name: "job_id", type: "string", required: false, description: "Act on this queued job instead of crafting. Call craft with no recipe_id to list your job IDs. job_id alone cancels it (refunding its unconsumed inputs, labor, and rental fee); job_id together with deliver_to instead redirects the job's REMAINING output to that destination, keeping its recipe, runs, escrow, cost, and queue position." },
|
|
2454
2559
|
{ name: "job_ids", type: "string[]", required: false, description: "Bulk cancel: cancel many queued jobs in one action. Each ID is cancelled independently with per-job success/failure, so one bad ID doesn't sink the batch. Refunds the unconsumed escrow of every cancelled job." },
|
|
2455
2560
|
{ name: "jobs", type: "{ deliver_to?: string; facility_id?: string; items?: { item_id: string; quantity: number }[]; label?: string; output_package_label?: string; package_id?: string; package_ids?: string[]; preset?: string; quantity?: number; recipe_id: string; source?: string; target?: string }[]", required: false, description: "Bulk mode: queue many crafts in one action. Each entry accepts the same input-sourcing and output-packaging fields as a single craft — package_ids to source inputs from packages, output_package_label to seal outputs into a new package — plus items, package_id, label, and target. Each job commits independently with partial success. Max 50." },
|
|
2456
2561
|
{ name: "label", type: "string", required: false, description: "For pack_package: player-authored package label." },
|
|
@@ -2499,7 +2604,7 @@ var ACTIONS = {
|
|
|
2499
2604
|
summary: "Find the shortest route to a destination system, POI, or base",
|
|
2500
2605
|
responseType: "FindRouteResponse",
|
|
2501
2606
|
params: [
|
|
2502
|
-
{ name: "id", type: "string", required: true, description: "ID
|
|
2607
|
+
{ name: "id", type: "string", required: true, description: "Destination system ID, POI ID, or station Base ID. A station may be identified by either its Base ID or station POI ID. Use search_systems to find system IDs by name.", positional: 0 }
|
|
2503
2608
|
]
|
|
2504
2609
|
},
|
|
2505
2610
|
"spacemolt/get_achievements": {
|
|
@@ -2567,7 +2672,7 @@ var ACTIONS = {
|
|
|
2567
2672
|
summary: "Get a detailed playstyle progression guide. Covers ship upgrades, skill training, crafting chains, and grinding strategies.",
|
|
2568
2673
|
responseType: "GetGuideResponse",
|
|
2569
2674
|
params: [
|
|
2570
|
-
{ name: "id", type: '"miner" | "trader" | "pirate-hunter" | "explorer" | "base-builder" | "drones" | "fuel" | "crafting"', required: false, description: "Guide to read (omit to list available guides)", enumValues: ["miner", "trader", "pirate-hunter", "explorer", "base-builder", "drones", "fuel", "crafting"], positional: 0 }
|
|
2675
|
+
{ name: "id", type: '"miner" | "trader" | "pirate-hunter" | "boarding" | "explorer" | "base-builder" | "drones" | "fuel" | "crafting"', required: false, description: "Guide to read (omit to list available guides)", enumValues: ["miner", "trader", "pirate-hunter", "boarding", "explorer", "base-builder", "drones", "fuel", "crafting"], positional: 0 }
|
|
2571
2676
|
]
|
|
2572
2677
|
},
|
|
2573
2678
|
"spacemolt/get_location": {
|
|
@@ -2600,7 +2705,7 @@ var ACTIONS = {
|
|
|
2600
2705
|
tool: "spacemolt",
|
|
2601
2706
|
action: "get_nearby",
|
|
2602
2707
|
kind: "query",
|
|
2603
|
-
summary: "Get
|
|
2708
|
+
summary: "Get visible players, NPCs, creatures, and intact prizes at your current POI",
|
|
2604
2709
|
responseType: "GetNearbyResponse",
|
|
2605
2710
|
params: []
|
|
2606
2711
|
},
|
|
@@ -2613,7 +2718,7 @@ var ACTIONS = {
|
|
|
2613
2718
|
params: [
|
|
2614
2719
|
{ name: "clear", type: "boolean", required: false, description: "Remove returned notifications from queue (default: true). Set to false to peek without clearing." },
|
|
2615
2720
|
{ name: "limit", type: "number", required: false, description: "Max notifications to return (default: 50, max: 100)." },
|
|
2616
|
-
{ name: "types", type: '("chat" | "combat" | "trade" | "market" | "crafting" | "system")[]', required: false, description: "Filter by notification types. Omit for all types." }
|
|
2721
|
+
{ name: "types", type: '("chat" | "combat" | "trade" | "market" | "crafting" | "observation" | "system")[]', required: false, description: "Filter by notification types. Omit for all types." }
|
|
2617
2722
|
]
|
|
2618
2723
|
},
|
|
2619
2724
|
"spacemolt/get_player": {
|
|
@@ -2646,7 +2751,9 @@ var ACTIONS = {
|
|
|
2646
2751
|
kind: "query",
|
|
2647
2752
|
summary: "Get ship and module details (v2 format)",
|
|
2648
2753
|
responseType: "V2GameState",
|
|
2649
|
-
params: [
|
|
2754
|
+
params: [
|
|
2755
|
+
{ name: "id", type: "string", required: false, description: "Ship to report on (from list_ships or faction_garages). Omit for the ship you are flying. Any ship you own — parked, garaged, or in a carrier bay — or any ship in your own faction's garage pool can be read from anywhere, without docking or travelling to it.", positional: 0 }
|
|
2756
|
+
]
|
|
2650
2757
|
},
|
|
2651
2758
|
"spacemolt/get_skills": {
|
|
2652
2759
|
tool: "spacemolt",
|
|
@@ -2784,7 +2891,7 @@ var ACTIONS = {
|
|
|
2784
2891
|
summary: "Load all waiting passengers bound for a destination into your passenger berths",
|
|
2785
2892
|
detailsType: "LoadPassengersResponse",
|
|
2786
2893
|
params: [
|
|
2787
|
-
{ name: "id", type: "string", required: true, description: "Destination station ID or name. Loads all waiting passengers here bound for it, up to your free berths.", positional: 0 }
|
|
2894
|
+
{ name: "id", type: "string", required: true, description: "Destination station Base ID, station POI ID, or name. Loads all waiting passengers here bound for it, up to your free berths.", positional: 0 }
|
|
2788
2895
|
]
|
|
2789
2896
|
},
|
|
2790
2897
|
"spacemolt/mine": {
|
|
@@ -2795,6 +2902,17 @@ var ACTIONS = {
|
|
|
2795
2902
|
detailsType: "MineResponse",
|
|
2796
2903
|
params: []
|
|
2797
2904
|
},
|
|
2905
|
+
"spacemolt/pay_bounty": {
|
|
2906
|
+
tool: "spacemolt",
|
|
2907
|
+
action: "pay_bounty",
|
|
2908
|
+
kind: "mutation",
|
|
2909
|
+
summary: "Settle your outstanding bounty with an empire from anywhere",
|
|
2910
|
+
detailsType: "PayBountyResponse",
|
|
2911
|
+
params: [
|
|
2912
|
+
{ name: "id", type: "string", required: false, description: "Empire whose bounty to clear: solarian, voidborn, crimson, nebula, outerrim. Omit when you owe exactly one empire.", positional: 0 },
|
|
2913
|
+
{ name: "source", type: '"self" | "faction"', required: false, description: 'Who funds it: "self" (your wallet, the default) or "faction" (the faction treasury; requires ManageTreasury).', enumValues: ["self", "faction"] }
|
|
2914
|
+
]
|
|
2915
|
+
},
|
|
2798
2916
|
"spacemolt/prepay_tax": {
|
|
2799
2917
|
tool: "spacemolt",
|
|
2800
2918
|
action: "prepay_tax",
|
|
@@ -2812,11 +2930,11 @@ var ACTIONS = {
|
|
|
2812
2930
|
summary: "Queue a recycling job: consume a recipe's outputs to recover a fraction of its inputs",
|
|
2813
2931
|
detailsType: "RecycleJobResponse",
|
|
2814
2932
|
params: [
|
|
2815
|
-
{ name: "deliver_to", type: "string", required: false, description: "Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific Storage Extension bucket." },
|
|
2933
|
+
{ name: "deliver_to", type: "string", required: false, description: "Output destination: 'storage' (default), 'faction' (faction main store — requires manage treasury permission), or 'faction:<bucket name or id>' for a specific Storage Extension bucket. Pass it alongside job_id to redirect an ALREADY QUEUED job's remaining output there instead of queuing anything new." },
|
|
2816
2934
|
{ name: "dry_run", type: "boolean", required: false, description: "Return a cost+time quote (feedstock consumed, fees, venue, ETA) without queuing anything. Not supported with bulk jobs." },
|
|
2817
2935
|
{ name: "facility_id", type: "string", required: false, description: "Route to a specific recycler facility ID (overrides auto-selection)." },
|
|
2818
2936
|
{ name: "id", type: "string", required: false, description: "Recipe ID to recycle (the recycler consumes the recipe's outputs and returns a lossy fraction of its inputs). Use catalog with type=recipes to browse.", positional: 0 },
|
|
2819
|
-
{ name: "job_id", type: "string", required: false, description: "
|
|
2937
|
+
{ name: "job_id", type: "string", required: false, description: "Act on this queued job instead of recycling. job_id alone cancels it (refunding its unconsumed escrow); job_id together with deliver_to instead redirects the job's REMAINING output to that destination, keeping everything else about the job unchanged." },
|
|
2820
2938
|
{ name: "job_ids", type: "string[]", required: false, description: "Bulk cancel: cancel many queued jobs in one action. Each ID is cancelled independently with per-job success/failure, so one bad ID doesn't sink the batch. Refunds the unconsumed escrow of every cancelled job." },
|
|
2821
2939
|
{ name: "jobs", type: "Record<string, unknown>[]", required: false, description: "Bulk mode: recycle many recipes in one action. Each entry: {recipe_id, quantity, facility_id?, preset?, deliver_to?, source?}. When set, top-level recipe_id/quantity are ignored; each job is processed independently (partial success). Max 50." },
|
|
2822
2940
|
{ name: "preset", type: '"fast" | "cheap" | "prefer_own"', required: false, description: "Auto-routing preset: 'fast' (fewest ticks, default) picks the best eligible recycler globally, so a busy own recycler may route to an idle public rental. 'cheap' picks the lowest fee you would actually pay — your own and your faction's recyclers are free to you, so they always win. Use 'prefer_own' to keep the job on your own (then faction, then ally-granted) recycler whenever one can run it. Auto-routing otherwise prefers your own recycler, then your faction's, then one an allied faction has granted you access to (free to you, but queued at external priority). 'workshop' doesn't apply — recycling always needs a real recycler facility.", enumValues: ["fast", "cheap", "prefer_own"] },
|
|
@@ -2832,8 +2950,8 @@ var ACTIONS = {
|
|
|
2832
2950
|
detailsType: "RefuelResponse",
|
|
2833
2951
|
params: [
|
|
2834
2952
|
{ name: "id", type: "string", required: false, description: "Specific fuel cell type to use (e.g. fuel_cell, fuel_cell_premium, fuel_cell_military). Auto-selects cheapest if omitted.", positional: 0 },
|
|
2835
|
-
{ name: "quantity", type: "number", required: false, description: "Number of fuel cells to burn or units to transfer
|
|
2836
|
-
{ name: "target", type: "string", required: false, description: "Player ID or username to
|
|
2953
|
+
{ name: "quantity", type: "number", required: false, description: "Number of fuel cells to burn or fuel units to transfer. Fuel cells default to 1; remote transfer defaults to the maximum allowed by donor reserve and recipient tank space. Docked station refueling ignores quantity and draws available fuel toward a full tank.", positional: 1 },
|
|
2954
|
+
{ name: "target", type: "string", required: false, description: "Player ID or username at the same real POI to receive fuel, or 'fleet' for read-only fleet fuel status. Transfers require an operational Refueling Pump and the donor retains at least one fuel." }
|
|
2837
2955
|
]
|
|
2838
2956
|
},
|
|
2839
2957
|
"spacemolt/repair": {
|
|
@@ -2843,19 +2961,9 @@ var ACTIONS = {
|
|
|
2843
2961
|
summary: "Repair hull — at station (credits), in space (repair kits), or on another ship (repair arm + kits)",
|
|
2844
2962
|
detailsType: "RepairResponse",
|
|
2845
2963
|
params: [
|
|
2846
|
-
{ name: "
|
|
2847
|
-
{ name: "quantity", type: "number", required: false, description: "Number of repair kits to use (default 1).
|
|
2848
|
-
{ name: "target", type: "string", required: false, description: "Player ID or username to repair, or 'fleet' for fleet hull status.
|
|
2849
|
-
]
|
|
2850
|
-
},
|
|
2851
|
-
"spacemolt/repair_module": {
|
|
2852
|
-
tool: "spacemolt",
|
|
2853
|
-
action: "repair_module",
|
|
2854
|
-
kind: "mutation",
|
|
2855
|
-
summary: "Repair wear on a module using a Repair Kit",
|
|
2856
|
-
detailsType: "RepairModuleResponse",
|
|
2857
|
-
params: [
|
|
2858
|
-
{ name: "id", type: "string", required: true, description: "Instance ID of the module to repair (must be in cargo, not fitted)", positional: 0 }
|
|
2964
|
+
{ name: "id", type: "string", required: false, description: "Specific repair item to use (e.g. repair_kit, hull_patch). Auto-selects cheapest if omitted.", positional: 0 },
|
|
2965
|
+
{ name: "quantity", type: "number", required: false, description: "Number of repair kits to use (default 1). Remote repair is limited by available kits and target hull need. Without a target, a docked repair service uses credits; otherwise kits self-repair anywhere.", positional: 1 },
|
|
2966
|
+
{ name: "target", type: "string", required: false, description: "Player ID or username to repair at the same real POI, or 'fleet' for read-only fleet hull status. Ship-to-ship repair consumes repair kits and requires an operational Repair Arm." }
|
|
2859
2967
|
]
|
|
2860
2968
|
},
|
|
2861
2969
|
"spacemolt/scan": {
|
|
@@ -2865,7 +2973,7 @@ var ACTIONS = {
|
|
|
2865
2973
|
summary: "Scan a target, or sweep the area for cloaked ships when no target is given",
|
|
2866
2974
|
detailsType: "ScanResponse",
|
|
2867
2975
|
params: [
|
|
2868
|
-
{ name: "id", type: "string", required: false, description: "ID/username
|
|
2976
|
+
{ 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 }
|
|
2869
2977
|
]
|
|
2870
2978
|
},
|
|
2871
2979
|
"spacemolt/search_systems": {
|
|
@@ -2923,7 +3031,7 @@ var ACTIONS = {
|
|
|
2923
3031
|
summary: "Travel to a different Point of Interest (POI) within your current system",
|
|
2924
3032
|
detailsType: "TravelResponse",
|
|
2925
3033
|
params: [
|
|
2926
|
-
{ name: "id", type: "string", required: true, description: "
|
|
3034
|
+
{ name: "id", type: "string", required: true, description: "POI ID to travel to (use get_system to see available POIs). For a station, either its POI ID or Base ID is accepted.", positional: 0 }
|
|
2927
3035
|
]
|
|
2928
3036
|
},
|
|
2929
3037
|
"spacemolt/undock": {
|
|
@@ -3020,7 +3128,7 @@ function buildCommands(dispatch) {
|
|
|
3020
3128
|
get_player: bindBare("spacemolt", "get_player"),
|
|
3021
3129
|
get_poi: bindBare("spacemolt", "get_poi"),
|
|
3022
3130
|
get_queue: bindBare("spacemolt", "get_queue"),
|
|
3023
|
-
get_ship:
|
|
3131
|
+
get_ship: bind("spacemolt", "get_ship"),
|
|
3024
3132
|
get_skills: bindBare("spacemolt", "get_skills"),
|
|
3025
3133
|
get_state: bindBare("spacemolt", "get_state"),
|
|
3026
3134
|
get_status: bindBare("spacemolt", "get_status"),
|
|
@@ -3037,11 +3145,11 @@ function buildCommands(dispatch) {
|
|
|
3037
3145
|
list_station_passengers: bindBare("spacemolt", "list_station_passengers"),
|
|
3038
3146
|
load_passenger: bind("spacemolt", "load_passenger"),
|
|
3039
3147
|
mine: bindBare("spacemolt", "mine"),
|
|
3148
|
+
pay_bounty: bind("spacemolt", "pay_bounty"),
|
|
3040
3149
|
prepay_tax: bind("spacemolt", "prepay_tax"),
|
|
3041
3150
|
recycle: bind("spacemolt", "recycle"),
|
|
3042
3151
|
refuel: bind("spacemolt", "refuel"),
|
|
3043
3152
|
repair: bind("spacemolt", "repair"),
|
|
3044
|
-
repair_module: bind("spacemolt", "repair_module"),
|
|
3045
3153
|
scan: bind("spacemolt", "scan"),
|
|
3046
3154
|
search_systems: bind("spacemolt", "search_systems"),
|
|
3047
3155
|
self_destruct: bindBare("spacemolt", "self_destruct"),
|
|
@@ -3071,6 +3179,7 @@ function buildCommands(dispatch) {
|
|
|
3071
3179
|
log: bind("spacemolt_battle", "log"),
|
|
3072
3180
|
reload: bind("spacemolt_battle", "reload"),
|
|
3073
3181
|
retreat: bindBare("spacemolt_battle", "retreat"),
|
|
3182
|
+
self_destruct: bindBare("spacemolt_battle", "self_destruct"),
|
|
3074
3183
|
stance: bind("spacemolt_battle", "stance"),
|
|
3075
3184
|
status: bindBare("spacemolt_battle", "status"),
|
|
3076
3185
|
summary: bind("spacemolt_battle", "summary"),
|
|
@@ -3223,6 +3332,7 @@ function buildCommands(dispatch) {
|
|
|
3223
3332
|
view_orders: bind("spacemolt_market", "view_orders")
|
|
3224
3333
|
},
|
|
3225
3334
|
spacemolt_salvage: {
|
|
3335
|
+
claim_prize: bind("spacemolt_salvage", "claim_prize"),
|
|
3226
3336
|
insure: bindBare("spacemolt_salvage", "insure"),
|
|
3227
3337
|
loot: bind("spacemolt_salvage", "loot"),
|
|
3228
3338
|
policies: bindBare("spacemolt_salvage", "policies"),
|
|
@@ -3230,6 +3340,7 @@ function buildCommands(dispatch) {
|
|
|
3230
3340
|
release: bindBare("spacemolt_salvage", "release"),
|
|
3231
3341
|
scrap: bindBare("spacemolt_salvage", "scrap"),
|
|
3232
3342
|
sell: bindBare("spacemolt_salvage", "sell"),
|
|
3343
|
+
service_prize: bind("spacemolt_salvage", "service_prize"),
|
|
3233
3344
|
set_home: bind("spacemolt_salvage", "set_home"),
|
|
3234
3345
|
tow: bind("spacemolt_salvage", "tow"),
|
|
3235
3346
|
wrecks: bindBare("spacemolt_salvage", "wrecks")
|
|
@@ -3243,19 +3354,24 @@ function buildCommands(dispatch) {
|
|
|
3243
3354
|
commission_quote: bind("spacemolt_ship", "commission_quote"),
|
|
3244
3355
|
commission_ship: bind("spacemolt_ship", "commission_ship"),
|
|
3245
3356
|
commission_status: bind("spacemolt_ship", "commission_status"),
|
|
3357
|
+
faction_personnel: bind("spacemolt_ship", "faction_personnel"),
|
|
3246
3358
|
list_ship_for_sale: bind("spacemolt_ship", "list_ship_for_sale"),
|
|
3247
3359
|
list_ships: bindBare("spacemolt_ship", "list_ships"),
|
|
3248
3360
|
place_ship_buy_order: bind("spacemolt_ship", "place_ship_buy_order"),
|
|
3361
|
+
recruit_personnel: bind("spacemolt_ship", "recruit_personnel"),
|
|
3249
3362
|
refit_ship: bindBare("spacemolt_ship", "refit_ship"),
|
|
3250
3363
|
rename_ship: bind("spacemolt_ship", "rename_ship"),
|
|
3251
3364
|
scrap_ship: bind("spacemolt_ship", "scrap_ship"),
|
|
3252
3365
|
sell_ship_to_order: bind("spacemolt_ship", "sell_ship_to_order"),
|
|
3253
3366
|
supply_commission: bind("spacemolt_ship", "supply_commission"),
|
|
3254
3367
|
switch_ship: bind("spacemolt_ship", "switch_ship"),
|
|
3368
|
+
transfer_personnel: bind("spacemolt_ship", "transfer_personnel"),
|
|
3369
|
+
treat_personnel: bind("spacemolt_ship", "treat_personnel"),
|
|
3255
3370
|
view_ship_buy_orders: bindBare("spacemolt_ship", "view_ship_buy_orders")
|
|
3256
3371
|
},
|
|
3257
3372
|
spacemolt_shipping: {
|
|
3258
3373
|
accept: bind("spacemolt_shipping", "accept"),
|
|
3374
|
+
active: bindBare("spacemolt_shipping", "active"),
|
|
3259
3375
|
cancel: bind("spacemolt_shipping", "cancel"),
|
|
3260
3376
|
deliver: bind("spacemolt_shipping", "deliver"),
|
|
3261
3377
|
get: bind("spacemolt_shipping", "get"),
|
|
@@ -3722,6 +3838,9 @@ class StateCache {
|
|
|
3722
3838
|
get skills() {
|
|
3723
3839
|
return this.state.skills;
|
|
3724
3840
|
}
|
|
3841
|
+
get prizeRecoveries() {
|
|
3842
|
+
return this.state.prize_recoveries;
|
|
3843
|
+
}
|
|
3725
3844
|
get hasPendingAction() {
|
|
3726
3845
|
return this.state.queue?.has_pending ?? false;
|
|
3727
3846
|
}
|
|
@@ -3951,6 +4070,40 @@ class Socket {
|
|
|
3951
4070
|
|
|
3952
4071
|
// src/account.ts
|
|
3953
4072
|
var TRANSIT_ACTIONS = new Set(["spacemolt/jump", "spacemolt/travel"]);
|
|
4073
|
+
var ARRIVED = {
|
|
4074
|
+
docked_at: null,
|
|
4075
|
+
in_transit: false,
|
|
4076
|
+
transit_type: undefined,
|
|
4077
|
+
transit_arrival_tick: undefined,
|
|
4078
|
+
transit_dest_system_id: undefined,
|
|
4079
|
+
transit_dest_system_name: undefined,
|
|
4080
|
+
transit_dest_poi_id: undefined,
|
|
4081
|
+
transit_dest_poi_name: undefined,
|
|
4082
|
+
transit_bearing: undefined,
|
|
4083
|
+
transit_x: undefined,
|
|
4084
|
+
transit_y: undefined,
|
|
4085
|
+
transit_ticks_elapsed: undefined,
|
|
4086
|
+
void_message: undefined,
|
|
4087
|
+
poi_name: undefined,
|
|
4088
|
+
poi_type: undefined,
|
|
4089
|
+
resources: undefined,
|
|
4090
|
+
nearby_players: undefined,
|
|
4091
|
+
nearby_player_count: undefined,
|
|
4092
|
+
nearby_prizes: undefined,
|
|
4093
|
+
nearby_prize_count: undefined,
|
|
4094
|
+
nearby_pirates: undefined,
|
|
4095
|
+
nearby_pirate_count: undefined,
|
|
4096
|
+
nearby_empire_npcs: undefined,
|
|
4097
|
+
nearby_empire_npc_count: undefined,
|
|
4098
|
+
offline_collapsed: undefined,
|
|
4099
|
+
unknown_signature: undefined
|
|
4100
|
+
};
|
|
4101
|
+
var ARRIVED_IN_NEW_SYSTEM = {
|
|
4102
|
+
...ARRIVED,
|
|
4103
|
+
connections: undefined,
|
|
4104
|
+
empire: undefined,
|
|
4105
|
+
security_status: undefined
|
|
4106
|
+
};
|
|
3954
4107
|
var DEFAULT_URL = "wss://game.spacemolt.com/ws/v2";
|
|
3955
4108
|
var DEFAULT_CONNECT_TIMEOUT_MS = 15000;
|
|
3956
4109
|
var DEFAULT_MUTATION_TIMEOUT_MS = 600000;
|
|
@@ -4078,6 +4231,9 @@ class Account {
|
|
|
4078
4231
|
get skills() {
|
|
4079
4232
|
return this.cache.skills;
|
|
4080
4233
|
}
|
|
4234
|
+
get prizeRecoveries() {
|
|
4235
|
+
return this.cache.prizeRecoveries;
|
|
4236
|
+
}
|
|
4081
4237
|
get credits() {
|
|
4082
4238
|
return this.cache.credits;
|
|
4083
4239
|
}
|
|
@@ -4335,7 +4491,16 @@ class Account {
|
|
|
4335
4491
|
const view = this.observationCache.current();
|
|
4336
4492
|
if (!view)
|
|
4337
4493
|
return;
|
|
4338
|
-
const nearbyPlayers = [...view.nearby.
|
|
4494
|
+
const nearbyPlayers = [...view.nearby.entries()].map(([playerId, p]) => ({
|
|
4495
|
+
player_id: playerId,
|
|
4496
|
+
in_combat: p.in_combat ?? false,
|
|
4497
|
+
...p.clan_tag !== undefined && { clan_tag: p.clan_tag },
|
|
4498
|
+
...p.faction_tag !== undefined && { faction_tag: p.faction_tag },
|
|
4499
|
+
...p.offline !== undefined && { offline: p.offline },
|
|
4500
|
+
...p.ship_class !== undefined && { ship_class: p.ship_class },
|
|
4501
|
+
...p.ship_name !== undefined && { ship_name: p.ship_name },
|
|
4502
|
+
...p.username !== undefined && { username: p.username }
|
|
4503
|
+
}));
|
|
4339
4504
|
const changed = this.cache.patchSection("location", {
|
|
4340
4505
|
nearby_players: nearbyPlayers,
|
|
4341
4506
|
nearby_player_count: view.nearby.size
|
|
@@ -4366,27 +4531,17 @@ class Account {
|
|
|
4366
4531
|
const payload = frame.payload;
|
|
4367
4532
|
let changed = [];
|
|
4368
4533
|
let reconcile = false;
|
|
4369
|
-
const currentLocation = this.cache.location;
|
|
4370
|
-
const currentSystem = {
|
|
4371
|
-
connections: currentLocation?.connections,
|
|
4372
|
-
empire: currentLocation?.empire,
|
|
4373
|
-
security_status: currentLocation?.security_status,
|
|
4374
|
-
system_id: currentLocation?.system_id,
|
|
4375
|
-
system_name: currentLocation?.system_name
|
|
4376
|
-
};
|
|
4377
4534
|
switch (payload.action) {
|
|
4378
4535
|
case "fleet_jump": {
|
|
4379
4536
|
if (typeof payload.destination !== "string" || typeof payload.arrival_tick !== "number") {
|
|
4380
4537
|
this.warnMalformedFrame(frame);
|
|
4381
4538
|
return;
|
|
4382
4539
|
}
|
|
4383
|
-
changed = this.cache.
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
transit_type: "jump"
|
|
4389
|
-
}
|
|
4540
|
+
changed = this.cache.patchSection("location", {
|
|
4541
|
+
in_transit: true,
|
|
4542
|
+
transit_arrival_tick: payload.arrival_tick,
|
|
4543
|
+
transit_dest_system_id: payload.destination,
|
|
4544
|
+
transit_type: "jump"
|
|
4390
4545
|
});
|
|
4391
4546
|
reconcile = true;
|
|
4392
4547
|
break;
|
|
@@ -4397,13 +4552,11 @@ class Account {
|
|
|
4397
4552
|
this.warnMalformedFrame(frame);
|
|
4398
4553
|
return;
|
|
4399
4554
|
}
|
|
4400
|
-
changed = this.cache.
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
system_name: payload.system
|
|
4406
|
-
}
|
|
4555
|
+
changed = this.cache.patchSection("location", {
|
|
4556
|
+
...ARRIVED_IN_NEW_SYSTEM,
|
|
4557
|
+
poi_id: typeof payload.poi === "string" ? payload.poi : undefined,
|
|
4558
|
+
system_id: payload.system_id,
|
|
4559
|
+
system_name: payload.system
|
|
4407
4560
|
});
|
|
4408
4561
|
reconcile = true;
|
|
4409
4562
|
break;
|
|
@@ -4413,14 +4566,11 @@ class Account {
|
|
|
4413
4566
|
this.warnMalformedFrame(frame);
|
|
4414
4567
|
return;
|
|
4415
4568
|
}
|
|
4416
|
-
changed = this.cache.
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
transit_dest_poi_id: payload.destination,
|
|
4422
|
-
transit_type: "travel"
|
|
4423
|
-
}
|
|
4569
|
+
changed = this.cache.patchSection("location", {
|
|
4570
|
+
in_transit: true,
|
|
4571
|
+
transit_arrival_tick: payload.arrival_tick,
|
|
4572
|
+
transit_dest_poi_id: payload.destination,
|
|
4573
|
+
transit_type: "travel"
|
|
4424
4574
|
});
|
|
4425
4575
|
reconcile = true;
|
|
4426
4576
|
break;
|
|
@@ -4430,19 +4580,16 @@ class Account {
|
|
|
4430
4580
|
this.warnMalformedFrame(frame);
|
|
4431
4581
|
return;
|
|
4432
4582
|
}
|
|
4433
|
-
changed = this.cache.
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
poi_id: payload.poi_id,
|
|
4438
|
-
poi_name: payload.poi
|
|
4439
|
-
}
|
|
4583
|
+
changed = this.cache.patchSection("location", {
|
|
4584
|
+
...ARRIVED,
|
|
4585
|
+
poi_id: payload.poi_id,
|
|
4586
|
+
poi_name: payload.poi
|
|
4440
4587
|
});
|
|
4441
4588
|
reconcile = true;
|
|
4442
4589
|
break;
|
|
4443
4590
|
}
|
|
4444
4591
|
case "fleet_undock":
|
|
4445
|
-
changed =
|
|
4592
|
+
changed = this.cache.patchSection("location", { docked_at: null });
|
|
4446
4593
|
break;
|
|
4447
4594
|
case "fleet_dock":
|
|
4448
4595
|
reconcile = true;
|
|
@@ -4759,12 +4906,16 @@ function catalogEntries(value) {
|
|
|
4759
4906
|
function normalizeCatalog(value) {
|
|
4760
4907
|
const data = requireRecord(value, "catalog response");
|
|
4761
4908
|
return {
|
|
4762
|
-
version: typeof data.version === "string" ? data.version :
|
|
4909
|
+
version: typeof data.version === "string" ? data.version : "",
|
|
4763
4910
|
ships: catalogEntries(data.ships),
|
|
4764
4911
|
items: catalogEntries(data.items),
|
|
4765
4912
|
recipes: catalogEntries(data.recipes),
|
|
4766
4913
|
skills: catalogEntries(data.skills),
|
|
4767
|
-
facilities: catalogEntries(data.facilities)
|
|
4914
|
+
facilities: catalogEntries(data.facilities),
|
|
4915
|
+
achievements: catalogEntries(data.achievements),
|
|
4916
|
+
faction_achievements: catalogEntries(data.faction_achievements),
|
|
4917
|
+
hidden_achievement_count: typeof data.hidden_achievement_count === "number" ? data.hidden_achievement_count : 0,
|
|
4918
|
+
hidden_faction_achievement_count: typeof data.hidden_faction_achievement_count === "number" ? data.hidden_faction_achievement_count : 0
|
|
4768
4919
|
};
|
|
4769
4920
|
}
|
|
4770
4921
|
async function fetchCatalogConditional(httpBaseUrl, etag) {
|
|
@@ -4799,6 +4950,7 @@ class CatalogCache {
|
|
|
4799
4950
|
recipesById;
|
|
4800
4951
|
skillsById;
|
|
4801
4952
|
facilitiesById;
|
|
4953
|
+
achievementsById;
|
|
4802
4954
|
constructor(catalog, etag) {
|
|
4803
4955
|
this.catalog = catalog;
|
|
4804
4956
|
this.etag = etag;
|
|
@@ -4807,6 +4959,7 @@ class CatalogCache {
|
|
|
4807
4959
|
this.recipesById = index(catalog.recipes);
|
|
4808
4960
|
this.skillsById = index(catalog.skills);
|
|
4809
4961
|
this.facilitiesById = index(catalog.facilities);
|
|
4962
|
+
this.achievementsById = index([...catalog.achievements, ...catalog.faction_achievements]);
|
|
4810
4963
|
}
|
|
4811
4964
|
static async load(httpBaseUrl) {
|
|
4812
4965
|
const { catalog, etag } = await fetchCatalogConditional(httpBaseUrl);
|
|
@@ -4840,6 +4993,9 @@ class CatalogCache {
|
|
|
4840
4993
|
facility(id) {
|
|
4841
4994
|
return this.facilitiesById.get(id);
|
|
4842
4995
|
}
|
|
4996
|
+
achievement(id) {
|
|
4997
|
+
return this.achievementsById.get(id);
|
|
4998
|
+
}
|
|
4843
4999
|
get ships() {
|
|
4844
5000
|
return this.catalog.ships;
|
|
4845
5001
|
}
|
|
@@ -4855,6 +5011,18 @@ class CatalogCache {
|
|
|
4855
5011
|
get facilities() {
|
|
4856
5012
|
return this.catalog.facilities;
|
|
4857
5013
|
}
|
|
5014
|
+
get achievements() {
|
|
5015
|
+
return this.catalog.achievements;
|
|
5016
|
+
}
|
|
5017
|
+
get factionAchievements() {
|
|
5018
|
+
return this.catalog.faction_achievements;
|
|
5019
|
+
}
|
|
5020
|
+
get hiddenAchievementCount() {
|
|
5021
|
+
return this.catalog.hidden_achievement_count;
|
|
5022
|
+
}
|
|
5023
|
+
get hiddenFactionAchievementCount() {
|
|
5024
|
+
return this.catalog.hidden_faction_achievement_count;
|
|
5025
|
+
}
|
|
4858
5026
|
}
|
|
4859
5027
|
function index(entries) {
|
|
4860
5028
|
const map = new Map;
|
|
@@ -5218,6 +5386,17 @@ async function fetchStations(httpBaseUrl) {
|
|
|
5218
5386
|
const empires = Array.isArray(data.empires) ? data.empires.filter((empire) => isRecord(empire) && typeof empire.id === "string" && typeof empire.name === "string") : [];
|
|
5219
5387
|
return { stations, empires };
|
|
5220
5388
|
}
|
|
5389
|
+
// src/data/mobile-base.ts
|
|
5390
|
+
async function fetchMobileBase(httpBaseUrl) {
|
|
5391
|
+
const url = `${httpBaseUrl.replace(/\/$/, "")}/wheres-mobile-base`;
|
|
5392
|
+
const res = await fetch(url, { headers: { accept: "application/json" } });
|
|
5393
|
+
if (!res.ok)
|
|
5394
|
+
throw new Error(`GET ${url} -> ${res.status} ${res.statusText}`);
|
|
5395
|
+
const data = requireRecord(await res.json(), "mobile base response");
|
|
5396
|
+
if (typeof data.system !== "string")
|
|
5397
|
+
throw new Error("mobile base response is missing a system id");
|
|
5398
|
+
return { system: data.system };
|
|
5399
|
+
}
|
|
5221
5400
|
// src/generated/notifications.gen.ts
|
|
5222
5401
|
var TYPED_NOTIFICATION_TYPES = [
|
|
5223
5402
|
"achievement_unlocked",
|
|
@@ -5232,23 +5411,34 @@ var TYPED_NOTIFICATION_TYPES = [
|
|
|
5232
5411
|
"battle_update",
|
|
5233
5412
|
"chat_message",
|
|
5234
5413
|
"crafting_update",
|
|
5414
|
+
"drone_adrift",
|
|
5235
5415
|
"drone_destroyed",
|
|
5236
5416
|
"drone_scan",
|
|
5237
5417
|
"drone_survey",
|
|
5238
5418
|
"drone_update",
|
|
5239
5419
|
"facility_reclaimed",
|
|
5240
5420
|
"facility_rent_warning",
|
|
5421
|
+
"faction_alliance_broken",
|
|
5422
|
+
"faction_alliance_formed",
|
|
5423
|
+
"faction_alliance_proposal",
|
|
5424
|
+
"faction_peace_accepted",
|
|
5425
|
+
"faction_peace_proposal",
|
|
5426
|
+
"faction_war_declared",
|
|
5241
5427
|
"market_update",
|
|
5242
5428
|
"mining_yield",
|
|
5243
5429
|
"observation_update",
|
|
5430
|
+
"personnel_update",
|
|
5244
5431
|
"pilotless_ship",
|
|
5245
5432
|
"pirate_destroyed",
|
|
5246
5433
|
"pirate_radio",
|
|
5247
5434
|
"player_died",
|
|
5248
5435
|
"player_kill",
|
|
5436
|
+
"prize_update",
|
|
5249
5437
|
"ranch_poached",
|
|
5250
5438
|
"reconnected",
|
|
5251
5439
|
"scan_detected",
|
|
5440
|
+
"server_restart_warning",
|
|
5441
|
+
"ship_captured",
|
|
5252
5442
|
"ship_commission_complete",
|
|
5253
5443
|
"skill_level_up",
|
|
5254
5444
|
"station_repaired",
|
|
@@ -5281,6 +5471,7 @@ export {
|
|
|
5281
5471
|
fetchCatalog,
|
|
5282
5472
|
fetchCatalogConditional,
|
|
5283
5473
|
fetchMap,
|
|
5474
|
+
fetchMobileBase,
|
|
5284
5475
|
fetchStations,
|
|
5285
5476
|
httpBaseFromWs,
|
|
5286
5477
|
isActionErrorFrame,
|