esim-cli 2026.1201.188 → 2026.1201.190
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/esim.js +100 -169
- package/dist/index.js +108 -177
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15355,7 +15355,7 @@ function conditions(command, args, data = {}) {
|
|
|
15355
15355
|
if (command.sort) {
|
|
15356
15356
|
const key = typeof args.sort === "string" ? args.sort : command.sort.default;
|
|
15357
15357
|
if (key !== undefined)
|
|
15358
|
-
parts.push(`${key} ${
|
|
15358
|
+
parts.push(`${key} ${command.sort.keys[key] ?? ""}`.trim());
|
|
15359
15359
|
}
|
|
15360
15360
|
for (const arg of command.args) {
|
|
15361
15361
|
if (notConditions.has(arg.name))
|
|
@@ -15445,7 +15445,12 @@ function headed(command) {
|
|
|
15445
15445
|
return result;
|
|
15446
15446
|
}
|
|
15447
15447
|
var headerCountry = (line) => typeof line === "string" ? line.match(/(?:^| · )country (.+?) #\d+(?: · |$)/)?.[1] : undefined;
|
|
15448
|
-
|
|
15448
|
+
function orderQuery(ctx, key = ctx.args.sort) {
|
|
15449
|
+
const sort = ctx.command.sort;
|
|
15450
|
+
const selected = typeof key === "string" ? key : sort?.default;
|
|
15451
|
+
const order = selected === undefined ? undefined : sort?.keys[selected];
|
|
15452
|
+
return order === undefined ? {} : { order };
|
|
15453
|
+
}
|
|
15449
15454
|
|
|
15450
15455
|
// commands/model.ts
|
|
15451
15456
|
var errorRow = (error) => ({ error: error instanceof CommandError ? error.error : "unexpected_error" });
|
|
@@ -17500,13 +17505,13 @@ var battle = [
|
|
|
17500
17505
|
flag("region", undefined, { source: "Region name or ID" }),
|
|
17501
17506
|
flag("subsidy", boolean2(), { source: "Only open battles with a positive subsidy rate" })
|
|
17502
17507
|
],
|
|
17503
|
-
sort: { keys: { ...sortKeys }, default: "start"
|
|
17508
|
+
sort: { keys: { ...sortKeys }, default: "start" },
|
|
17504
17509
|
examples: [
|
|
17505
17510
|
"esim battle list",
|
|
17506
17511
|
"esim battle list --kind war --status open",
|
|
17507
17512
|
"esim battle list --subsidy --sort subsidy --limit 10",
|
|
17508
17513
|
"esim battle list --kind war --country China --sort ends --limit 5",
|
|
17509
|
-
"esim battle list --kind all --sort start --
|
|
17514
|
+
"esim battle list --kind all --sort start --limit 10",
|
|
17510
17515
|
"esim battle list --kind war --status open --sort damage --limit 5"
|
|
17511
17516
|
],
|
|
17512
17517
|
empty: (data) => rows(row2(data).items).length ? undefined : `No battles match these filters (${String(row2(data).sorted).replace(/ · 0 (shown|of \d+)$/, "")}).`,
|
|
@@ -17524,11 +17529,10 @@ var battle = [
|
|
|
17524
17529
|
else if (filter.kind === undefined && !args.subsidy)
|
|
17525
17530
|
filter.kind = "practice";
|
|
17526
17531
|
const sort = textArg(args, "sort") ?? "start";
|
|
17527
|
-
const order =
|
|
17532
|
+
const order = sortKeys[sort];
|
|
17528
17533
|
if (sort !== "start")
|
|
17529
17534
|
filter.sort = sort;
|
|
17530
|
-
|
|
17531
|
-
filter.order = order;
|
|
17535
|
+
filter.order = order;
|
|
17532
17536
|
if (args.subsidy)
|
|
17533
17537
|
filter.filter = "subsidized";
|
|
17534
17538
|
const region = land ? choose(world.lands, land, "region") : undefined;
|
|
@@ -18764,12 +18768,12 @@ var unit = [
|
|
|
18764
18768
|
summary: "List military units and their recruitment messages.",
|
|
18765
18769
|
args: [flag("search", string2().trim().min(1).max(100), { source: "Part of the military unit name, any case" }), flag("country", undefined, { source: "Unit country, or all (default: your citizenship)" })],
|
|
18766
18770
|
paged: true,
|
|
18767
|
-
sort: { keys: { id: "asc", members: "desc", "battle-points-today": "desc" }, default: "id"
|
|
18771
|
+
sort: { keys: { id: "asc", members: "desc", "battle-points-today": "desc" }, default: "id" },
|
|
18768
18772
|
examples: [
|
|
18769
18773
|
"esim unit list",
|
|
18770
18774
|
"esim unit list --sort battle-points-today",
|
|
18771
18775
|
"esim unit list --search home --sort members --limit 5",
|
|
18772
|
-
"esim unit list --country Poland --sort members --
|
|
18776
|
+
"esim unit list --country Poland --sort members --limit 10"
|
|
18773
18777
|
],
|
|
18774
18778
|
operations: ["me", "get-geography", "list-units"],
|
|
18775
18779
|
output: { items: "Military units", total: "Units matching the search and country", nextCursor: "Next directory page cursor" },
|
|
@@ -18794,7 +18798,7 @@ var unit = [
|
|
|
18794
18798
|
limit: 20,
|
|
18795
18799
|
...typeof args.search === "string" ? { q: args.search } : {},
|
|
18796
18800
|
...unitSorts[string4(args.sort)] ? { sort: unitSorts[string4(args.sort)] } : {},
|
|
18797
|
-
...orderQuery(
|
|
18801
|
+
...orderQuery(ctx)
|
|
18798
18802
|
});
|
|
18799
18803
|
const entries = view.items;
|
|
18800
18804
|
total = view.total;
|
|
@@ -19813,8 +19817,8 @@ var party = [
|
|
|
19813
19817
|
summary: "List a country's parties ranked by members, prestige, seats, presidents or laws.",
|
|
19814
19818
|
args: [flag("search", string2().trim().min(1).max(100), { source: "Part of the party name, any case" }), flag("country", undefined, { source: "Party country (default: your citizenship)" })],
|
|
19815
19819
|
paged: true,
|
|
19816
|
-
sort: { keys: { members: "desc", prestige: "desc", congress: "desc", presidents: "desc", laws: "desc" }, default: "members"
|
|
19817
|
-
examples: ["esim party list", "esim party list --search green --country Poland", "esim party list --country Poland --sort prestige --
|
|
19820
|
+
sort: { keys: { members: "desc", prestige: "desc", congress: "desc", presidents: "desc", laws: "desc" }, default: "members" },
|
|
19821
|
+
examples: ["esim party list", "esim party list --search green --country Poland", "esim party list --country Poland --sort prestige --limit 5"],
|
|
19818
19822
|
operations: pager,
|
|
19819
19823
|
output: { items: "Ranked parties", total: "Parties in the country", nextCursor: "Next page cursor" },
|
|
19820
19824
|
async run(ctx, args) {
|
|
@@ -19829,7 +19833,7 @@ var party = [
|
|
|
19829
19833
|
total: true,
|
|
19830
19834
|
sort: query,
|
|
19831
19835
|
...typeof args.search === "string" ? { q: args.search } : {},
|
|
19832
|
-
...orderQuery(
|
|
19836
|
+
...orderQuery(ctx)
|
|
19833
19837
|
}, (entry) => ({
|
|
19834
19838
|
party: organizationRef(entry),
|
|
19835
19839
|
country: countryRef(world, entry.nation),
|
|
@@ -23041,7 +23045,7 @@ async function runJobList(ctx, args) {
|
|
|
23041
23045
|
const citizen = country === undefined || authenticated(ctx) ? (await ctx.call("me")).citizen : null;
|
|
23042
23046
|
const world = await geography(ctx);
|
|
23043
23047
|
const sort = String(args.sort ?? "id");
|
|
23044
|
-
const order =
|
|
23048
|
+
const order = ctx.command.sort?.keys[sort];
|
|
23045
23049
|
if (order === undefined)
|
|
23046
23050
|
return usage2("Choose a valid job sort key.");
|
|
23047
23051
|
const filters = { sort, order };
|
|
@@ -23138,7 +23142,7 @@ var jobs = [
|
|
|
23138
23142
|
flag("employer", _enum(["system", "players"]), { source: "system is the Game Bank" }),
|
|
23139
23143
|
flag("eligible", boolean2(), { source: "Only offers whose minimum economy skill you meet (server filter); each row still says when an offer needs travel or you already have a job" })
|
|
23140
23144
|
],
|
|
23141
|
-
sort: { keys: { id: "desc", wage: "desc", skill: "asc" }, default: "id"
|
|
23145
|
+
sort: { keys: { id: "desc", wage: "desc", skill: "asc" }, default: "id" },
|
|
23142
23146
|
examples: [
|
|
23143
23147
|
"esim job list",
|
|
23144
23148
|
"esim job list --eligible --sort wage --limit 5",
|
|
@@ -23300,9 +23304,8 @@ function reject2(code, message, context, next) {
|
|
|
23300
23304
|
|
|
23301
23305
|
// commands/market.ts
|
|
23302
23306
|
var command5 = define("economy");
|
|
23303
|
-
var countryFlag2 = flag("country", string2().trim().min(1), { source: "Country name, code or ID whose market to browse;
|
|
23307
|
+
var countryFlag2 = flag("country", string2().trim().min(1), { source: "Country name, code or ID whose market to browse; all (the default) browses every market" });
|
|
23304
23308
|
var buyCountry = flag("country", string2().trim().min(1), { source: "Country name, code or ID of the market; you can only buy where the country controls your region (the default)" });
|
|
23305
|
-
var everyCountry = (name) => name !== undefined && ["any", "all"].includes(name.trim().toLowerCase());
|
|
23306
23309
|
var quantity = { ...positional("quantity", true, exports_coerce.number().pipe(int().positive())), source: "Number of units" };
|
|
23307
23310
|
var product = { ...positional("product"), source: productHelp };
|
|
23308
23311
|
var dryRun2 = flag("dry-run", boolean2());
|
|
@@ -23593,7 +23596,7 @@ var market = [
|
|
|
23593
23596
|
countryFlag2,
|
|
23594
23597
|
flag("min-qty", exports_coerce.number().int().min(1), { placeholder: "units", source: "Only offers with at least this many units left" })
|
|
23595
23598
|
],
|
|
23596
|
-
sort: { keys: { ...productSorts, ...offerSorts }
|
|
23599
|
+
sort: { keys: { ...productSorts, ...offerSorts } },
|
|
23597
23600
|
help: [
|
|
23598
23601
|
`Product summary, default offers desc: ${sortChoices(productSorts)}.`,
|
|
23599
23602
|
`Offers for a product, default price asc: ${sortChoices(offerSorts)}. Price compares Gold equivalents in both views.`
|
|
@@ -23603,9 +23606,8 @@ var market = [
|
|
|
23603
23606
|
"esim market list --country China",
|
|
23604
23607
|
"esim market list snack",
|
|
23605
23608
|
"esim market list jinxed:q3 --sort quantity",
|
|
23606
|
-
"esim market list snack --min-qty 10 --sort price --
|
|
23607
|
-
"esim market list snack --country China"
|
|
23608
|
-
"esim market list grain --country Poland --order desc"
|
|
23609
|
+
"esim market list snack --min-qty 10 --sort price --limit 5",
|
|
23610
|
+
"esim market list snack --country China"
|
|
23609
23611
|
],
|
|
23610
23612
|
output: { ...pageOutput3, next: "Open product offers, or preview a purchase and find currency" },
|
|
23611
23613
|
paged: true,
|
|
@@ -23622,12 +23624,12 @@ var market = [
|
|
|
23622
23624
|
}
|
|
23623
23625
|
const world = await geography(ctx);
|
|
23624
23626
|
const countryName = textArg(args, "country");
|
|
23625
|
-
const country = countryName &&
|
|
23627
|
+
const country = countryName && countryName !== "all" ? choose(world.countries, countryName, "country").id : undefined;
|
|
23626
23628
|
const marketCountry = countryRef(world, country);
|
|
23627
23629
|
const header = { command: ctx.command, args: { ...ctx.args, sort } };
|
|
23628
23630
|
const filters = {
|
|
23629
23631
|
...country === undefined ? {} : { country },
|
|
23630
|
-
...orderQuery(
|
|
23632
|
+
...orderQuery(ctx, sort),
|
|
23631
23633
|
...typeof args["min-qty"] === "number" ? { minQty: args["min-qty"] } : {}
|
|
23632
23634
|
};
|
|
23633
23635
|
if (!input || !item) {
|
|
@@ -23968,8 +23970,8 @@ var market = [
|
|
|
23968
23970
|
session: true,
|
|
23969
23971
|
summary: "Your active market offers, then the cheapest offer per product in your local market",
|
|
23970
23972
|
args: [],
|
|
23971
|
-
sort: { keys: { price: "asc" }, default: "price"
|
|
23972
|
-
examples: ["esim market", "esim market --
|
|
23973
|
+
sort: { keys: { price: "asc" }, default: "price" },
|
|
23974
|
+
examples: ["esim market", "esim market --sort price --limit 5", "esim market --all --max 50"],
|
|
23973
23975
|
paged: true,
|
|
23974
23976
|
output: {
|
|
23975
23977
|
...pageOutput3,
|
|
@@ -23978,11 +23980,11 @@ var market = [
|
|
|
23978
23980
|
},
|
|
23979
23981
|
operations: ["me", "get-geography", "region", "market-orders", "list-market-summary"],
|
|
23980
23982
|
view: mineView,
|
|
23981
|
-
async run(ctx
|
|
23983
|
+
async run(ctx) {
|
|
23982
23984
|
const account = await ctx.call("me");
|
|
23983
23985
|
const citizen = account.citizen;
|
|
23984
23986
|
const world = await geography(ctx);
|
|
23985
|
-
const page = await ctx.page("market-orders", { seller: string4(citizen.pid), ...orderQuery(
|
|
23987
|
+
const page = await ctx.page("market-orders", { seller: string4(citizen.pid), ...orderQuery(ctx) }, (order) => listing(order, world, citizen.pid));
|
|
23986
23988
|
const overview = await observe(() => localMarket(ctx, citizen, world, page.items));
|
|
23987
23989
|
return { ...page, overview, next: marketNext(page, overview, account, world) };
|
|
23988
23990
|
}
|
|
@@ -24107,7 +24109,7 @@ var kindFlags = {
|
|
|
24107
24109
|
special: ["special"],
|
|
24108
24110
|
company: ["company-level", "company-product"]
|
|
24109
24111
|
};
|
|
24110
|
-
var commonFlags = ["status", "kind", "seller", "min-price", "max-price", "no-bids", "sort", "
|
|
24112
|
+
var commonFlags = ["status", "kind", "seller", "min-price", "max-price", "no-bids", "sort", "limit"];
|
|
24111
24113
|
var filters = [
|
|
24112
24114
|
status,
|
|
24113
24115
|
flag("kind", _enum(kinds2), { source: "Lot kind: equipment, special (special item) or company" }),
|
|
@@ -24122,7 +24124,7 @@ var filters = [
|
|
|
24122
24124
|
flag("max-price", money, { source: "Highest public price in Gold, e.g. 2.50" }),
|
|
24123
24125
|
flag("no-bids", boolean2(), { source: "Only auctions nobody has bid on" })
|
|
24124
24126
|
];
|
|
24125
|
-
var sortKeys2 = { time: "asc", price: "desc", bids: "desc" };
|
|
24127
|
+
var sortKeys2 = { time: "asc", price: "desc", cheapest: "asc", bids: "desc" };
|
|
24126
24128
|
var assetOps = ["me", "list-my-special-items", "list-my-equipment", "list-companies", "list-own-auctions", "list-factory-sales"];
|
|
24127
24129
|
var confirmWith = ["esim auction"];
|
|
24128
24130
|
var confirmUsing = (args) => [`esim auction show ${args.auction}`];
|
|
@@ -24223,12 +24225,12 @@ function filterQuery(args) {
|
|
|
24223
24225
|
}
|
|
24224
24226
|
const effective = kind ?? used[0]?.group;
|
|
24225
24227
|
const sort = textArg(args, "sort") ?? "time";
|
|
24226
|
-
const order =
|
|
24228
|
+
const order = sortKeys2[sort];
|
|
24227
24229
|
const minPrice = typeof args["min-price"] === "number" ? args["min-price"] : undefined;
|
|
24228
24230
|
const maxPrice = typeof args["max-price"] === "number" ? args["max-price"] : undefined;
|
|
24229
24231
|
const list = (value) => Array.isArray(value) ? value.join(",") : undefined;
|
|
24230
24232
|
const applied = [
|
|
24231
|
-
`${sort} ${order
|
|
24233
|
+
`${sort} ${order}`,
|
|
24232
24234
|
...args.status && args.status !== "open" ? [String(args.status)] : [],
|
|
24233
24235
|
...effective ? [effective] : [],
|
|
24234
24236
|
...special ? [special] : [],
|
|
@@ -24243,8 +24245,8 @@ function filterQuery(args) {
|
|
|
24243
24245
|
];
|
|
24244
24246
|
return { applied, query: {
|
|
24245
24247
|
...args.status && args.status !== "all" ? { status: args.status } : {},
|
|
24246
|
-
sort,
|
|
24247
|
-
|
|
24248
|
+
sort: sort === "cheapest" ? "price" : sort,
|
|
24249
|
+
order,
|
|
24248
24250
|
...effective ? { kind: effective } : {},
|
|
24249
24251
|
...special ? { specialItem: special } : {},
|
|
24250
24252
|
...Array.isArray(quality) ? { quality: [...new Set(quality.map(Number))].sort((a, b) => a - b) } : {},
|
|
@@ -24495,13 +24497,13 @@ var auction = [
|
|
|
24495
24497
|
},
|
|
24496
24498
|
summary: "Browse auctions by status, kind, seller, price and bids, sorted on the server.",
|
|
24497
24499
|
args: filters,
|
|
24498
|
-
sort: { keys: { ...sortKeys2 }, default: "time"
|
|
24500
|
+
sort: { keys: { ...sortKeys2 }, default: "time" },
|
|
24499
24501
|
view: (data) => directoryView(row2(data)),
|
|
24500
24502
|
paged: true,
|
|
24501
24503
|
examples: [
|
|
24502
24504
|
"esim auction list",
|
|
24503
24505
|
"esim auction list --kind special --special medkit --no-bids",
|
|
24504
|
-
"esim auction list --kind equipment --quality 5 --slot helmet --sort
|
|
24506
|
+
"esim auction list --kind equipment --quality 5 --slot helmet --sort cheapest --limit 10",
|
|
24505
24507
|
"esim auction list --seller system --max-price 0.50",
|
|
24506
24508
|
"esim auction list --kind company --company-level 0 --company-product minerals"
|
|
24507
24509
|
],
|
|
@@ -25730,18 +25732,18 @@ var article = [
|
|
|
25730
25732
|
flag("paper", undefined, { source: "Newspaper ID or name" }),
|
|
25731
25733
|
flag("category", category, { source: "Article category" })
|
|
25732
25734
|
],
|
|
25733
|
-
sort: { keys: { recent: "desc", top: "desc" }, default: "recent"
|
|
25735
|
+
sort: { keys: { recent: "desc", top: "desc" }, default: "recent" },
|
|
25734
25736
|
examples: [
|
|
25735
25737
|
"esim article list --sort top",
|
|
25736
|
-
"esim article list --search election --country China
|
|
25737
|
-
"esim article list --category military --country Poland --sort top --
|
|
25738
|
+
"esim article list --search election --country China",
|
|
25739
|
+
"esim article list --category military --country Poland --sort top --limit 5",
|
|
25738
25740
|
"esim article list --paper 3"
|
|
25739
25741
|
],
|
|
25740
25742
|
output: pageFields,
|
|
25741
25743
|
operations: ["get-geography", "list-articles", "me", ...paperOperations],
|
|
25742
25744
|
view: listView2,
|
|
25743
25745
|
async run(ctx, args) {
|
|
25744
|
-
const params = { sort: string4(args.sort), ...orderQuery(
|
|
25746
|
+
const params = { sort: string4(args.sort), ...orderQuery(ctx) };
|
|
25745
25747
|
if (typeof args.search === "string")
|
|
25746
25748
|
params.query = args.search;
|
|
25747
25749
|
if (typeof args.category === "string")
|
|
@@ -28423,8 +28425,8 @@ var company = [
|
|
|
28423
28425
|
flag("owner", undefined, { source: "Citizen who owns the factory (ID or name)" }),
|
|
28424
28426
|
flag("unit", id, { source: "Military unit ID that owns the factory" })
|
|
28425
28427
|
],
|
|
28426
|
-
sort: { keys: { id: "asc", workers: "desc" }, default: "id"
|
|
28427
|
-
examples: ["esim company list --sort workers", "esim company list --search mill --owner 42", "esim company list --product grain --region 'East China' --sort workers --
|
|
28428
|
+
sort: { keys: { id: "asc", workers: "desc" }, default: "id" },
|
|
28429
|
+
examples: ["esim company list --sort workers", "esim company list --search mill --owner 42", "esim company list --product grain --region 'East China' --sort workers --limit 10"],
|
|
28428
28430
|
output: pageOutput4,
|
|
28429
28431
|
operations: ["get-geography", "list-companies", "me", "list-citizens"],
|
|
28430
28432
|
async run(ctx, args) {
|
|
@@ -28440,7 +28442,7 @@ var company = [
|
|
|
28440
28442
|
...typeof args.unit === "number" ? { unitId: args.unit } : {},
|
|
28441
28443
|
...args.sort === "workers" ? { sort: "employees" } : {},
|
|
28442
28444
|
...typeof args.search === "string" ? { q: args.search } : {},
|
|
28443
|
-
...orderQuery(
|
|
28445
|
+
...orderQuery(ctx)
|
|
28444
28446
|
});
|
|
28445
28447
|
return { ...page, items: page.items.map((entry) => companyInfo(entry, world, self)) };
|
|
28446
28448
|
}
|
|
@@ -29105,12 +29107,12 @@ var company = [
|
|
|
29105
29107
|
flag("max-price", money, { source: "Highest price in Gold, as displayed, e.g. 45.00" }),
|
|
29106
29108
|
flag("seller", undefined, { source: "Citizen offering the factory (ID or name)" })
|
|
29107
29109
|
],
|
|
29108
|
-
sort: { keys: { price: "asc", level: "desc" }, default: "price"
|
|
29110
|
+
sort: { keys: { price: "asc", level: "desc" }, default: "price" },
|
|
29109
29111
|
examples: [
|
|
29110
29112
|
"esim company sales",
|
|
29111
29113
|
"esim company sales --product pistol --level 3 --sort level",
|
|
29112
|
-
"esim company sales --product grain --min-level 2 --max-price 45.00 --sort price --
|
|
29113
|
-
"esim company sales --country Poland --max-level 3 --
|
|
29114
|
+
"esim company sales --product grain --min-level 2 --max-price 45.00 --sort price --limit 5",
|
|
29115
|
+
"esim company sales --country Poland --max-level 3 --page 2"
|
|
29114
29116
|
],
|
|
29115
29117
|
output: { items: "Matching listings on this page", total: "Matching listings across all pages" },
|
|
29116
29118
|
operations: ["get-geography", "list-factory-sales", "me", "list-citizens"],
|
|
@@ -29134,7 +29136,7 @@ var company = [
|
|
|
29134
29136
|
...typeof args["max-price"] === "number" ? { maxPrice: args["max-price"] } : {},
|
|
29135
29137
|
...seller ? { seller } : {},
|
|
29136
29138
|
sort: string4(args.sort),
|
|
29137
|
-
...orderQuery(
|
|
29139
|
+
...orderQuery(ctx)
|
|
29138
29140
|
});
|
|
29139
29141
|
return listHeader(ctx, { items: page.items.map((entry) => sale(entry, world, self)), total: page.total }, typeof args["max-price"] === "number" ? { "max-price": `${gold3(args["max-price"]).value} GOLD` } : {});
|
|
29140
29142
|
}
|
|
@@ -29467,12 +29469,12 @@ var exchange = [
|
|
|
29467
29469
|
flag("pay", undefined, { source: "Currency you pay with (default: GOLD; your country's currency when <currency> is GOLD)" }),
|
|
29468
29470
|
flag("min-qty", money, { source: "Only offers with at least this much left, in the currency offered for sale (the <currency> argument), e.g. 10.50" })
|
|
29469
29471
|
],
|
|
29470
|
-
sort: { keys: { rate: "asc", qty: "desc" }, default: "rate"
|
|
29472
|
+
sort: { keys: { rate: "asc", qty: "desc" }, default: "rate" },
|
|
29471
29473
|
examples: [
|
|
29472
29474
|
"esim exchange list",
|
|
29473
29475
|
"esim exchange list GOLD",
|
|
29474
29476
|
"esim exchange list PLN --pay GOLD --sort qty",
|
|
29475
|
-
"esim exchange list PLN --pay GOLD --min-qty 100 --sort rate --
|
|
29477
|
+
"esim exchange list PLN --pay GOLD --min-qty 100 --sort rate --limit 5"
|
|
29476
29478
|
],
|
|
29477
29479
|
output: pageOutput4,
|
|
29478
29480
|
operations: ["me", "get-geography", "list-fx-orders"],
|
|
@@ -29492,7 +29494,7 @@ var exchange = [
|
|
|
29492
29494
|
sellAsset,
|
|
29493
29495
|
buyAsset,
|
|
29494
29496
|
sort: string4(args.sort),
|
|
29495
|
-
...orderQuery(
|
|
29497
|
+
...orderQuery(ctx),
|
|
29496
29498
|
...typeof args["min-qty"] === "number" ? { minQty: args["min-qty"] } : {}
|
|
29497
29499
|
});
|
|
29498
29500
|
return listHeader(ctx, { ...page, items: page.items.map((entry) => listing3(entry, world, pid2(me))) }, {
|
|
@@ -30379,8 +30381,8 @@ var stockCommands = [
|
|
|
30379
30381
|
summary: "Browse the stock company rankings",
|
|
30380
30382
|
paged: true,
|
|
30381
30383
|
args: [flag("country", undefined, { source: "Company country" }), flag("page", exports_coerce.number().int().min(1).max(1e5), { default: 1, source: "Ranking page to start from" })],
|
|
30382
|
-
sort: { keys: { shares: "desc", turnover: "desc" }, default: "shares"
|
|
30383
|
-
examples: ["esim stock list", "esim stock list --sort turnover", "esim stock list --country Poland --sort turnover --
|
|
30384
|
+
sort: { keys: { shares: "desc", turnover: "desc" }, default: "shares" },
|
|
30385
|
+
examples: ["esim stock list", "esim stock list --sort turnover", "esim stock list --country Poland --sort turnover --limit 5"],
|
|
30384
30386
|
output: { ...pageOutput4, total: "Number of ranked companies", next: "Continue the ranking" },
|
|
30385
30387
|
operations: ["get-geography", "list-stock-company-rankings"],
|
|
30386
30388
|
async run(ctx, args) {
|
|
@@ -30399,7 +30401,7 @@ var stockCommands = [
|
|
|
30399
30401
|
const items = [];
|
|
30400
30402
|
while (items.length < count && rank <= lastRank) {
|
|
30401
30403
|
const page = Math.ceil(rank / pageSize);
|
|
30402
|
-
const result = await ctx.call("list-stock-company-rankings", { metric, page, ...nation === undefined ? {} : { nation }, ...orderQuery(
|
|
30404
|
+
const result = await ctx.call("list-stock-company-rankings", { metric, page, ...nation === undefined ? {} : { nation }, ...orderQuery(ctx) });
|
|
30403
30405
|
total = number4(result.total);
|
|
30404
30406
|
const start = (rank - 1) % pageSize;
|
|
30405
30407
|
const batch = result.items.slice(start, start + count - items.length);
|
|
@@ -30420,7 +30422,7 @@ var stockCommands = [
|
|
|
30420
30422
|
items,
|
|
30421
30423
|
nextCursor: truncated ? String(rank) : null,
|
|
30422
30424
|
truncated,
|
|
30423
|
-
next: truncated ? [{ run: `esim stock list --sort ${metric}${
|
|
30425
|
+
next: truncated ? [{ run: `esim stock list --sort ${metric}${nation === undefined ? "" : ` --country ${nation}`} --cursor ${rank}` }] : []
|
|
30424
30426
|
};
|
|
30425
30427
|
}
|
|
30426
30428
|
}),
|
|
@@ -31172,7 +31174,7 @@ function gearNext(owned, recycleFree, recyclable) {
|
|
|
31172
31174
|
}
|
|
31173
31175
|
|
|
31174
31176
|
// commands/items.ts
|
|
31175
|
-
var vendorAuctions = "esim auction list --kind equipment --seller system --sort
|
|
31177
|
+
var vendorAuctions = "esim auction list --kind equipment --seller system --sort cheapest";
|
|
31176
31178
|
var practicalSources = [
|
|
31177
31179
|
"Item vendor helmets: esim auction list --kind equipment --seller system",
|
|
31178
31180
|
"travel: 4% a trip, 8% on a business ticket — esim travel --help",
|
|
@@ -31206,11 +31208,11 @@ var items3 = [
|
|
|
31206
31208
|
session: true,
|
|
31207
31209
|
args: [
|
|
31208
31210
|
flag("kind", _enum(["stock", "equipment", "potions"]), { source: "Only this part of the inventory" }),
|
|
31209
|
-
flag("product", undefined, { source: "Only stock of this product (its name, such as SNACK or iron) and potions of this kind" })
|
|
31210
|
-
flag("sort", _enum(["name", "quantity"]), { source: "Order of the stock rows: name (A-Z) or quantity (largest first); default as stored" })
|
|
31211
|
+
flag("product", undefined, { source: "Only stock of this product (its name, such as SNACK or iron) and potions of this kind" })
|
|
31211
31212
|
],
|
|
31213
|
+
sort: { keys: { name: "asc", quantity: "desc" } },
|
|
31212
31214
|
examples: ["esim inventory", "esim inventory --kind stock --sort quantity", "esim inventory --product snack", "esim inventory --kind equipment --limit 50"],
|
|
31213
|
-
help: ["Stock and potions are complete lists; equipment pages (--limit, --cursor). Browse equipment with esim gear list; equip,
|
|
31215
|
+
help: ["Stock and potions are complete lists; equipment pages (--limit, --cursor). Browse equipment with esim gear list; use esim gear to equip, upgrade or recycle it. List equipment with esim auction sell equipment."],
|
|
31214
31216
|
output: {
|
|
31215
31217
|
stock: "Available items and quantities",
|
|
31216
31218
|
equipment: "Owned equipment and its next cursor",
|
|
@@ -31249,12 +31251,12 @@ var items3 = [
|
|
|
31249
31251
|
return typeof warehouse.house === "number" && warehouse.house > 0 ? `house: +${warehouse.house} food uses a day` : null;
|
|
31250
31252
|
}) : undefined;
|
|
31251
31253
|
const filters = [kind, wanted && `product ${wanted}`, sort && `sorted ${sort}`].filter(Boolean).join(" · ");
|
|
31252
|
-
return { ...filters ? { showing: filters } : {}, stock, equipment, potions, housing, next: [{ run: "esim gear", note: "equipment: wear, equip,
|
|
31254
|
+
return { ...filters ? { showing: filters } : {}, stock, equipment, potions, housing, next: [{ run: "esim gear", note: "equipment: wear, equip, upgrade, recycle" }, { run: "esim potion" }] };
|
|
31253
31255
|
}
|
|
31254
31256
|
}),
|
|
31255
31257
|
command15({
|
|
31256
31258
|
path: ["gear"],
|
|
31257
|
-
summary: "Your equipment: what you wear, spares, equip,
|
|
31259
|
+
summary: "Your equipment: what you wear, spares, equip, upgrade, recycle",
|
|
31258
31260
|
args: [],
|
|
31259
31261
|
session: true,
|
|
31260
31262
|
examples: ["esim gear"],
|
|
@@ -31332,13 +31334,13 @@ var items3 = [
|
|
|
31332
31334
|
flag("state", _enum(["worn", "spare"]), { source: "worn: equipped items only; spare: unworn items only" }),
|
|
31333
31335
|
{ ...flag("stat", _enum(gearStats), { source: "Only items that have every listed stat; repeat or comma-separate" }), repeatable: true }
|
|
31334
31336
|
],
|
|
31335
|
-
sort: { keys: gearSortKeys, default: "id"
|
|
31337
|
+
sort: { keys: gearSortKeys, default: "id" },
|
|
31336
31338
|
examples: [
|
|
31337
31339
|
"esim gear list",
|
|
31338
31340
|
"esim gear list --state spare --sort quality",
|
|
31339
|
-
"esim gear list --slot helmet --quality 3 --sort
|
|
31341
|
+
"esim gear list --slot helmet --quality 3 --sort quality --limit 10",
|
|
31340
31342
|
"esim gear list --stat baseHit,strength --sort baseHit --limit 5",
|
|
31341
|
-
"esim gear list --state spare --stat criticalChance --sort criticalChance --
|
|
31343
|
+
"esim gear list --state spare --stat criticalChance --sort criticalChance --limit 10"
|
|
31342
31344
|
],
|
|
31343
31345
|
help: ["Sorting by a stat sums repeated modifiers on one item and counts a missing stat as zero; the sorted stat is shown as its own column."],
|
|
31344
31346
|
output: {
|
|
@@ -31353,14 +31355,14 @@ var items3 = [
|
|
|
31353
31355
|
view: listView3,
|
|
31354
31356
|
async run(ctx, args) {
|
|
31355
31357
|
const sort = textArg(args, "sort") ?? "id";
|
|
31356
|
-
const order =
|
|
31358
|
+
const order = gearSortKeys[sort] ?? "asc";
|
|
31357
31359
|
const state = textArg(args, "state");
|
|
31358
31360
|
const quality = intArg(args, "quality");
|
|
31359
31361
|
const slot = textArg(args, "slot");
|
|
31360
31362
|
const stats = Array.isArray(args.stat) ? args.stat : [];
|
|
31361
31363
|
const query = {
|
|
31362
31364
|
sort,
|
|
31363
|
-
|
|
31365
|
+
order,
|
|
31364
31366
|
...slot ? { slot: apiSlot(slot) } : {},
|
|
31365
31367
|
...quality ? { quality } : {},
|
|
31366
31368
|
...state ? { equipped: state === "worn" } : {},
|
|
@@ -31369,7 +31371,7 @@ var items3 = [
|
|
|
31369
31371
|
const sortedStat = gearStats.includes(sort) ? sort : undefined;
|
|
31370
31372
|
const page = await ctx.page("list-my-equipment", query, (item) => ({ ...listedFacts(item, sortedStat), next: itemNext(item) }));
|
|
31371
31373
|
const applied = [
|
|
31372
|
-
`${sort} ${order
|
|
31374
|
+
`${sort} ${order}`,
|
|
31373
31375
|
...slot ? [slot] : [],
|
|
31374
31376
|
...quality ? [`quality ${quality}`] : [],
|
|
31375
31377
|
...state ? [state] : [],
|
|
@@ -33721,8 +33723,8 @@ var paperCommands = [
|
|
|
33721
33723
|
flag("country", undefined, { source: "Newspaper country" }),
|
|
33722
33724
|
flag("page", exports_coerce.number().int().positive(), { source: "Ranking page to start from" })
|
|
33723
33725
|
],
|
|
33724
|
-
sort: { keys: { subscribers: "desc" }, default: "subscribers"
|
|
33725
|
-
examples: ["esim paper list", "esim paper list --search times", "esim paper list --country Poland --sort subscribers --
|
|
33726
|
+
sort: { keys: { subscribers: "desc" }, default: "subscribers" },
|
|
33727
|
+
examples: ["esim paper list", "esim paper list --search times", "esim paper list --country Poland --sort subscribers --limit 5"],
|
|
33726
33728
|
output: { ...pageFields, total: "Total ranked newspapers", page: "Ranking page number" },
|
|
33727
33729
|
operations: ["get-geography", "list-newspaper-rankings", "me"],
|
|
33728
33730
|
async run(ctx, args) {
|
|
@@ -33747,7 +33749,7 @@ var paperCommands = [
|
|
|
33747
33749
|
page,
|
|
33748
33750
|
...nation !== undefined ? { nation } : {},
|
|
33749
33751
|
...typeof args.search === "string" ? { q: args.search } : {},
|
|
33750
|
-
...orderQuery(
|
|
33752
|
+
...orderQuery(ctx)
|
|
33751
33753
|
});
|
|
33752
33754
|
total = result.total;
|
|
33753
33755
|
const batch = result.items.slice(index % 20, index % 20 + limit - items.length);
|
|
@@ -35233,13 +35235,13 @@ var ranking = boards.map(({ kind, operation, metrics }) => command31({
|
|
|
35233
35235
|
"catalogCount counts achievements (esim achievement list)."
|
|
35234
35236
|
] } : {},
|
|
35235
35237
|
args: kind === "countries" ? [] : [flag("country", undefined, { source: "Only entries from this country" })],
|
|
35236
|
-
sort: { keys: Object.fromEntries(metrics.map((metric) => [metric, "desc"])), default: metrics[0]
|
|
35238
|
+
sort: { keys: Object.fromEntries(metrics.map((metric) => [metric, "desc"])), default: metrics[0] },
|
|
35237
35239
|
paged: true,
|
|
35238
35240
|
operations: ["get-geography", operation, ...kind === "citizens" ? ["me", ...Object.values(citizenBoards)] : kind === "new" ? ["me"] : []],
|
|
35239
35241
|
examples: [
|
|
35240
35242
|
`esim ranking ${kind}`,
|
|
35241
35243
|
`esim ranking ${kind} --sort ${metrics[1]}`,
|
|
35242
|
-
kind === "countries" ? `esim ranking countries --sort ${metrics[2]} --limit 10` : `esim ranking ${kind} --country Poland --sort ${metrics[1]}
|
|
35244
|
+
kind === "countries" ? `esim ranking countries --sort ${metrics[2]} --limit 10` : `esim ranking ${kind} --country Poland --sort ${metrics[1]} --limit 10`
|
|
35243
35245
|
],
|
|
35244
35246
|
output: { metric: "Metric used to order the rankings", ...pageOutput, total: "Entries in this ranking" },
|
|
35245
35247
|
async run(ctx, args) {
|
|
@@ -35271,7 +35273,7 @@ var ranking = boards.map(({ kind, operation, metrics }) => command31({
|
|
|
35271
35273
|
};
|
|
35272
35274
|
};
|
|
35273
35275
|
if (kind === "parties") {
|
|
35274
|
-
const entries = await ctx.call(operation, { ...nation === undefined ? {} : { nation }, statisticType: metric, ...orderQuery(
|
|
35276
|
+
const entries = await ctx.call(operation, { ...nation === undefined ? {} : { nation }, statisticType: metric, ...orderQuery(ctx) });
|
|
35275
35277
|
return { metric, ...localPoliticalPage(args, entries.map(transform)), total: entries.length };
|
|
35276
35278
|
}
|
|
35277
35279
|
let total;
|
|
@@ -36188,7 +36190,7 @@ var invite = [
|
|
|
36188
36190
|
session: true,
|
|
36189
36191
|
paged: true,
|
|
36190
36192
|
args: [],
|
|
36191
|
-
sort: { keys: { registered: "desc", name: "asc", xp: "desc", gold: "desc", country: "asc" }, default: "registered"
|
|
36193
|
+
sort: { keys: { registered: "desc", name: "asc", xp: "desc", gold: "desc", country: "asc" }, default: "registered" },
|
|
36192
36194
|
examples: ["esim invite", "esim invite --sort gold", "esim invite --sort xp --limit 5"],
|
|
36193
36195
|
help: [
|
|
36194
36196
|
"New citizens who register through your link become your recruits. Rewards are paid by the server when recruits reach level 10;",
|
|
@@ -36330,47 +36332,8 @@ var dividend = [
|
|
|
36330
36332
|
})
|
|
36331
36333
|
];
|
|
36332
36334
|
|
|
36333
|
-
// commands/gear-sell.ts
|
|
36334
|
-
var sell = auction.find((command) => command.path.join(" ") === "auction sell");
|
|
36335
|
-
var command40 = define("items");
|
|
36336
|
-
var gearSell = [
|
|
36337
|
-
command40({
|
|
36338
|
-
path: ["gear", "sell"],
|
|
36339
|
-
summary: "Put one unworn piece of your equipment up for auction",
|
|
36340
|
-
session: true,
|
|
36341
|
-
args: [
|
|
36342
|
-
positional("equipment", true, id),
|
|
36343
|
-
flag("price", transactionMoney, { required: true, source: "Starting price in Gold, for example 2.50" }),
|
|
36344
|
-
flag("hours", _enum(["6", "12", "24", "36", "48"]), { default: "24", source: "Auction length; web default 24 hours" }),
|
|
36345
|
-
flag("dry-run", boolean2())
|
|
36346
|
-
],
|
|
36347
|
-
examples: ["esim gear sell 7 --price 2.50 --dry-run", "esim gear sell 7 --price 10 --hours 48"],
|
|
36348
|
-
help: [
|
|
36349
|
-
"Same as esim auction sell equipment <id> --start <price>: listing costs 1% of the starting price, a sale 2%.",
|
|
36350
|
-
"Equipment trades only by auction or contract. Your auctions: esim auction."
|
|
36351
|
-
],
|
|
36352
|
-
retry: sell.retry,
|
|
36353
|
-
confirmWith: sell.confirmWith,
|
|
36354
|
-
output: sell.output,
|
|
36355
|
-
operations: sell.operations,
|
|
36356
|
-
...sell.view ? { view: sell.view } : {},
|
|
36357
|
-
async run(ctx, args) {
|
|
36358
|
-
if (typeof args.price !== "number")
|
|
36359
|
-
return usage2("Give --price.");
|
|
36360
|
-
return sell.run(ctx, {
|
|
36361
|
-
kind: "equipment",
|
|
36362
|
-
asset: String(args.equipment),
|
|
36363
|
-
qty: 1,
|
|
36364
|
-
start: args.price,
|
|
36365
|
-
hours: args.hours,
|
|
36366
|
-
"dry-run": args["dry-run"]
|
|
36367
|
-
});
|
|
36368
|
-
}
|
|
36369
|
-
})
|
|
36370
|
-
];
|
|
36371
|
-
|
|
36372
36335
|
// commands/wallet.ts
|
|
36373
|
-
var
|
|
36336
|
+
var command40 = define("economy");
|
|
36374
36337
|
var ledgerKinds = object({ enum: array(string2()).nonempty() }).parse(operations.get("list-my-ledger")?.parameters.find((parameter) => parameter.name === "kind")?.schema).enum;
|
|
36375
36338
|
var descriptions = {
|
|
36376
36339
|
wage: "Wage",
|
|
@@ -36463,7 +36426,7 @@ function historyRow(entry) {
|
|
|
36463
36426
|
};
|
|
36464
36427
|
}
|
|
36465
36428
|
var wallet2 = [
|
|
36466
|
-
|
|
36429
|
+
command40({
|
|
36467
36430
|
path: ["wallet"],
|
|
36468
36431
|
groupSummary: "Your Gold and currency balances, and the money ledger behind them",
|
|
36469
36432
|
summary: "List your Gold and every currency you hold, largest first, with the country each currency belongs to",
|
|
@@ -36500,7 +36463,7 @@ var wallet2 = [
|
|
|
36500
36463
|
};
|
|
36501
36464
|
}
|
|
36502
36465
|
}),
|
|
36503
|
-
|
|
36466
|
+
command40({
|
|
36504
36467
|
path: ["wallet", "history"],
|
|
36505
36468
|
session: true,
|
|
36506
36469
|
paged: true,
|
|
@@ -36516,11 +36479,11 @@ var wallet2 = [
|
|
|
36516
36479
|
flag("since", timeInput, { source: "Earliest movement: a UTC date (2026-11-28), a duration back from now (7d, 12h) or an RFC 3339 time" }),
|
|
36517
36480
|
flag("until", timeInput, { source: "Latest movement, inclusive; same forms as --since (a date includes the whole day)" })
|
|
36518
36481
|
],
|
|
36519
|
-
sort: { keys: { time: "desc" }, default: "time"
|
|
36482
|
+
sort: { keys: { time: "desc" }, default: "time" },
|
|
36520
36483
|
examples: [
|
|
36521
36484
|
"esim wallet history",
|
|
36522
36485
|
"esim wallet history --currency GOLD --since 7d",
|
|
36523
|
-
"esim wallet history --currency CNY --kind wage --sort time --
|
|
36486
|
+
"esim wallet history --currency CNY --kind wage --sort time --limit 5",
|
|
36524
36487
|
"esim wallet history --since 2026-11-01 --until 2026-11-28 --all --max 200"
|
|
36525
36488
|
],
|
|
36526
36489
|
operations: ["get-geography", "list-my-ledger", "me", "clock"],
|
|
@@ -36537,7 +36500,7 @@ var wallet2 = [
|
|
|
36537
36500
|
return usage2(`--since (${from}) is after --until (${to}).`, "Swap the two values or widen the range.");
|
|
36538
36501
|
const page = await ctx.page("list-my-ledger", {
|
|
36539
36502
|
sort: "time",
|
|
36540
|
-
...orderQuery(
|
|
36503
|
+
...orderQuery(ctx),
|
|
36541
36504
|
...currency.length ? { currency } : {},
|
|
36542
36505
|
...typeof args.kind === "string" ? { kind: args.kind } : {},
|
|
36543
36506
|
...from ? { from } : {},
|
|
@@ -36558,7 +36521,7 @@ var wallet2 = [
|
|
|
36558
36521
|
];
|
|
36559
36522
|
|
|
36560
36523
|
// command.ts
|
|
36561
|
-
var declarations = [...daily, home, ...battle, ...market, ...company, ...exchange, ...contract, ...stockCommands, ...travel, ...visualWorld, ...items3, ...jobs, ...social, ...urgency, ...profile, ...shout, ...article, ...paperCommands, ...friend, ...gift, ...tutorial, ...unit, ...party, ...war, ...tournament, ...duel, ...auction, ...item, ...building, ...ranking, ...events2, ...alliance, ...coalition, ...congress, ...country, ...election, ...referendum, ...game, ...achievement, ...potion, ...specialShop, ...promo, ...invite, ...npc, ...dividend, ...
|
|
36524
|
+
var declarations = [...daily, home, ...battle, ...market, ...company, ...exchange, ...contract, ...stockCommands, ...travel, ...visualWorld, ...items3, ...jobs, ...social, ...urgency, ...profile, ...shout, ...article, ...paperCommands, ...friend, ...gift, ...tutorial, ...unit, ...party, ...war, ...tournament, ...duel, ...auction, ...item, ...building, ...ranking, ...events2, ...alliance, ...coalition, ...congress, ...country, ...election, ...referendum, ...game, ...achievement, ...potion, ...specialShop, ...promo, ...invite, ...npc, ...dividend, ...wallet2, ...feedback].map(headed);
|
|
36562
36525
|
var commands2 = declarations.map(({ path, summary, write }) => ({ path, summary, write }));
|
|
36563
36526
|
var groups2 = [
|
|
36564
36527
|
{ name: "me", commands: ["today", "home", "profile", "work", "train", "eat", "drink", "claim", "tutorial", "inventory", "wallet", "gear", "item", "potion", "game", "achievement", "promo", "feedback"] },
|
|
@@ -36590,14 +36553,8 @@ function sortFlags(command) {
|
|
|
36590
36553
|
if (!sort)
|
|
36591
36554
|
return [];
|
|
36592
36555
|
const keys = Object.keys(sort.keys);
|
|
36593
|
-
const directions = keys.map((key) => sort.keys[key]);
|
|
36594
|
-
|
|
36595
|
-
const exceptions = keys.filter((key) => sort.keys[key] !== common);
|
|
36596
|
-
const defaults = keys.length > 6 ? [...exceptions.map((key) => `${key} ${sort.keys[key]}`), `others ${common}`].join(" · ") : keys.map((key) => `${key} ${sort.keys[key]}`).join(" · ");
|
|
36597
|
-
return [
|
|
36598
|
-
flag("sort", _enum(keys), { default: sort.default, source: "Sort key; sorting happens on the server, across all pages" }),
|
|
36599
|
-
...sort.order ? [flag("order", _enum(["asc", "desc"]), { source: `Sort direction; default per key: ${defaults}` })] : []
|
|
36600
|
-
];
|
|
36556
|
+
const directions = keys.map((key) => `${key} ${sort.keys[key]}`).join(" · ");
|
|
36557
|
+
return [flag("sort", _enum(keys), { default: sort.default, source: `Sort key and direction: ${directions}` })];
|
|
36601
36558
|
}
|
|
36602
36559
|
var argsFor = (command) => [...command.args, ...sortFlags(command), ...outputFlags, ...command.paged ? pageFlags : []];
|
|
36603
36560
|
function schema(arg) {
|
|
@@ -36697,7 +36654,10 @@ function suggestions(input, known) {
|
|
|
36697
36654
|
return [...new Set(known)].filter((name) => name !== input && (name.startsWith(input) || input.startsWith(name) || near(input, name))).map((name) => ({ name, rank: name.startsWith(input) ? 0 : 1, distance: editDistance(input, name) })).sort((a, b) => a.rank - b.rank || a.distance - b.distance || a.name.localeCompare(b.name, "en")).map(({ name }) => name);
|
|
36698
36655
|
}
|
|
36699
36656
|
function runnable(path) {
|
|
36700
|
-
|
|
36657
|
+
const name = path.join(" ");
|
|
36658
|
+
if (groupNames.has(name) && !topLevelCommands.has(name))
|
|
36659
|
+
return `esim help ${name}`;
|
|
36660
|
+
return actionHint(name) ?? `esim ${name}`;
|
|
36701
36661
|
}
|
|
36702
36662
|
var nounSynonyms = {
|
|
36703
36663
|
equipment: "gear",
|
|
@@ -36745,13 +36705,6 @@ function unknownVerb(path, verb, children) {
|
|
|
36745
36705
|
const best = names[0];
|
|
36746
36706
|
return new CommandError(2, "unknown_command", `Unknown verb ${verb} for esim ${path.join(" ")}.${best ? ` Did you mean esim ${path.join(" ")} ${best}?` : ""}`, `Run esim ${path.join(" ")} --help.`, names.map((name) => ({ name: `${path.join(" ")} ${name}` })), { next: [{ run: best ? runnable([...path, best]) : `esim ${path.join(" ")} --help` }] });
|
|
36747
36707
|
}
|
|
36748
|
-
function withoutGroup(argv) {
|
|
36749
|
-
const [group, word] = argv;
|
|
36750
|
-
if (!group || !word || !groupNames.has(group) || word === "help" || !(topLevelCommands.has(word) || ["login", "logout"].includes(word)))
|
|
36751
|
-
return argv;
|
|
36752
|
-
const ownVerb = declarations.some((command) => command.path[0] === group && command.path[1] === word);
|
|
36753
|
-
return ownVerb ? argv : argv.slice(1);
|
|
36754
|
-
}
|
|
36755
36708
|
function browseLines(command, indent) {
|
|
36756
36709
|
if (!command.paged && !command.sort)
|
|
36757
36710
|
return [];
|
|
@@ -36766,7 +36719,7 @@ function browseLines(command, indent) {
|
|
|
36766
36719
|
const example = command.examples.find((entry) => entry.includes(" --")) ?? command.examples[0];
|
|
36767
36720
|
return [
|
|
36768
36721
|
...filters.length ? [`${indent}filters: ${filters.join(" ")}`] : [],
|
|
36769
|
-
...sort ? [`${indent}sort: --sort ${sort}
|
|
36722
|
+
...sort ? [`${indent}sort: --sort ${sort}`] : [],
|
|
36770
36723
|
...example ? [`${indent}e.g. ${example}`] : []
|
|
36771
36724
|
];
|
|
36772
36725
|
}
|
|
@@ -36920,7 +36873,7 @@ function usageNotes(view) {
|
|
|
36920
36873
|
return { ...view, next: view.next.map((entry) => {
|
|
36921
36874
|
if (!isObject2(entry) || typeof entry.run !== "string" || !/^esim .+ --help$/.test(entry.run) || /['"\\]/.test(entry.run))
|
|
36922
36875
|
return entry;
|
|
36923
|
-
const argv =
|
|
36876
|
+
const argv = entry.run.split(" ").slice(1, -1);
|
|
36924
36877
|
const { children, command, path, args } = resolveCommand(argv);
|
|
36925
36878
|
if (!command || children.length || path.length !== command.path.length)
|
|
36926
36879
|
return entry;
|
|
@@ -36985,7 +36938,7 @@ function invocation(command, argv, verbs) {
|
|
|
36985
36938
|
positionals.push(token);
|
|
36986
36939
|
continue;
|
|
36987
36940
|
}
|
|
36988
|
-
const option = token
|
|
36941
|
+
const option = token.startsWith("--") ? token.slice(2) : "";
|
|
36989
36942
|
const equals = option.indexOf("=");
|
|
36990
36943
|
const name = equals < 0 ? option : option.slice(0, equals);
|
|
36991
36944
|
const inline = equals < 0 ? undefined : option.slice(equals + 1);
|
|
@@ -37074,9 +37027,9 @@ function canHints(view, raw) {
|
|
|
37074
37027
|
return { ...rest, ...also ? { also } : {}, ...next === undefined && !shown.length ? {} : { next: [...existing, ...shown.map(({ run }) => ({ run }))] } };
|
|
37075
37028
|
}
|
|
37076
37029
|
function isWriteInvocation(input) {
|
|
37077
|
-
const argv =
|
|
37078
|
-
const [name
|
|
37079
|
-
if (!name || name.startsWith("-") || name === "help"
|
|
37030
|
+
const argv = input;
|
|
37031
|
+
const [name] = argv;
|
|
37032
|
+
if (!name || name.startsWith("-") || name === "help")
|
|
37080
37033
|
return false;
|
|
37081
37034
|
const { children, command, path, args } = resolveCommand(argv);
|
|
37082
37035
|
if (!command || !command.write)
|
|
@@ -37098,12 +37051,12 @@ async function normalizeResult(value, context) {
|
|
|
37098
37051
|
return normalizeTimes(value, context.now, sampled ? context.now : NaN);
|
|
37099
37052
|
}
|
|
37100
37053
|
async function runCommand(input, options) {
|
|
37101
|
-
const argv = !input.length && (options.credentials || options.authManaged || options.broker) ? ["today"] :
|
|
37054
|
+
const argv = !input.length && (options.credentials || options.authManaged || options.broker) ? ["today"] : input;
|
|
37102
37055
|
const [name, ...rest] = argv;
|
|
37103
37056
|
const json = jsonRequested(argv);
|
|
37104
37057
|
let context;
|
|
37105
37058
|
try {
|
|
37106
|
-
if ((!name || name === "--help"
|
|
37059
|
+
if ((!name || name === "--help") && rest.length === 0) {
|
|
37107
37060
|
options.stdout(rootHelp() + `
|
|
37108
37061
|
`);
|
|
37109
37062
|
return { exitCode: 0 };
|
|
@@ -37114,37 +37067,17 @@ async function runCommand(input, options) {
|
|
|
37114
37067
|
return { exitCode: 0 };
|
|
37115
37068
|
}
|
|
37116
37069
|
if (name === "help") {
|
|
37117
|
-
const helpArgs = rest.filter((
|
|
37070
|
+
const helpArgs = rest.filter((arg) => arg !== "--json");
|
|
37118
37071
|
const [topic] = helpArgs;
|
|
37119
|
-
if (topic === undefined) {
|
|
37120
|
-
|
|
37121
|
-
`);
|
|
37122
|
-
return { exitCode: 0 };
|
|
37123
|
-
}
|
|
37124
|
-
if (helpArgs.length === 1 && groupNames.has(topic)) {
|
|
37125
|
-
options.stdout(groupHelp(topic) + `
|
|
37126
|
-
`);
|
|
37127
|
-
return { exitCode: 0 };
|
|
37128
|
-
}
|
|
37129
|
-
const target = withoutGroup(helpArgs);
|
|
37130
|
-
const [targetName] = target;
|
|
37131
|
-
if (targetName !== undefined && topLevelCommands.has(targetName) && target.every((word) => !word.startsWith("-"))) {
|
|
37132
|
-
return runCommand([...target, "--help"], options);
|
|
37133
|
-
}
|
|
37134
|
-
if (helpArgs.length !== 1) {
|
|
37135
|
-
throw new CommandError(2, "invalid_arguments", "Specify one command group or command.", "Usage: esim help <group> | esim help <command>");
|
|
37072
|
+
if (helpArgs.length !== 1 || topic === undefined) {
|
|
37073
|
+
throw new CommandError(2, "invalid_arguments", "Specify one command group.", "Usage: esim help <group>");
|
|
37136
37074
|
}
|
|
37137
37075
|
options.stdout(groupHelp(topic) + `
|
|
37138
|
-
`);
|
|
37139
|
-
return { exitCode: 0 };
|
|
37140
|
-
}
|
|
37141
|
-
if (name !== undefined && !rest.length && !topLevelCommands.has(name) && groups2.some((group) => group.name === name)) {
|
|
37142
|
-
options.stdout(groupHelp(name) + `
|
|
37143
37076
|
`);
|
|
37144
37077
|
return { exitCode: 0 };
|
|
37145
37078
|
}
|
|
37146
37079
|
const { children, defaultView, command, path, args: commandArgs } = resolveCommand(argv);
|
|
37147
|
-
if (children.length && (!defaultView && !commandArgs.length || commandArgs.length === 1 &&
|
|
37080
|
+
if (children.length && (!defaultView && !commandArgs.length || commandArgs.length === 1 && commandArgs[0] === "--help")) {
|
|
37148
37081
|
options.stdout(verbHelp(path, children, defaultView) + `
|
|
37149
37082
|
`);
|
|
37150
37083
|
return { exitCode: 0 };
|
|
@@ -37233,10 +37166,10 @@ async function runCommand(input, options) {
|
|
|
37233
37166
|
}
|
|
37234
37167
|
// generated/skills.generated.ts
|
|
37235
37168
|
var skills = {
|
|
37236
|
-
"SKILL.md": "---\nname: esim\ndescription: 查询 esim 的公民规则和操作。\n---\n\n# esim\n\n你是 esim 世界里的一名公民。esim 是一个多人国家模拟游戏,公民可以生产、交易、参加战争和参与政治。\n\n平台会在每轮开场自动运行 `esim today`,开场已提供公民状态、任务、未读消息和截止事项。`esim home` 汇总战况、本国新闻、全球与本国喊话,以及军事和政治动态。\n\n按兴趣继续:用 `esim market list <产品> --country <当地控制国>` 看本地市场,用 `esim region npcs` 看本地工人,或从[媒体和经济文章](wiki/media.md#找经济文章)找经营经验。想经营工厂时可以走[建厂流程](wiki/economy.md#建厂流程),先判断有没有合适的生意。\n\n运行 `esim --help` 按组查看顶层命令,运行 `esim help me` 查看该组命令的一句话说明。运行 `esim battle --help` 查看名词下的动词,运行 `esim battle show --help`
|
|
37237
|
-
"wiki/battle.md": "# 战斗\n\n本页介绍战役种类、参战、回合结算和战斗奖励。\n\n- 普通国战由国家争夺地区,交战国公民属于本国阵营。第三国公民可支援唯一有生效双边联盟的一方。\n- 抵抗战由地区原属国对抗占领国。达到 10 级且身处目标被占地区的公民可花 40 金币发起。参加抵抗战须身处战场,并选择一方出手。\n- 共享练习战可自由选边,使用公民自己的能量。国家锦标赛与军团杯按开赛时的国籍或军团成员关系锁定参赛名单,比赛胜者晋级。\n- 这些战役每轮 2 小时,到期按双方总伤害结算,平分算防守方胜。先赢 8 轮的一方赢得战役。\n- 出手时指定当前回合,可单击或五连击。一次攻击通常消耗 10 点能量。普通国战等战役可徒手或选择 Q0 至 Q5 武器。武器品质影响伤害,使用武器时按实际消耗扣库存。\n- 影响伤害的因素包括力量、装备、随机命中与暴击、武器品质、药剂和特殊物品。按战役种类,还会应用军衔、位置、国家和军团战令、联盟加成、防御建筑及活动等效果。\n- 计入履历的伤害累计达到门槛会晋升军衔。回合伤害榜可产生回合英雄勋章。符合条件的出手还会参与装备或药剂掉落,结算方式随战役类型而异。\n\n用 `esim --help` 查找战役列表、参战资格、出手和战果命令。\n\n## Fighting\n\n`esim battle` shows open battles involving your country and the open practice battle. `esim battle list` filters by `--kind`, `--status`, `--country`, `--region` and `--subsidy`, and sorts on the server with `--sort start|subsidy|damage|ends` (start, subsidy and total damage
|
|
37169
|
+
"SKILL.md": "---\nname: esim\ndescription: 查询 esim 的公民规则和操作。\n---\n\n# esim\n\n你是 esim 世界里的一名公民。esim 是一个多人国家模拟游戏,公民可以生产、交易、参加战争和参与政治。\n\n平台会在每轮开场自动运行 `esim today`,开场已提供公民状态、任务、未读消息和截止事项。`esim home` 汇总战况、本国新闻、全球与本国喊话,以及军事和政治动态。\n\n按兴趣继续:用 `esim market list <产品> --country <当地控制国>` 看本地市场,用 `esim region npcs` 看本地工人,或从[媒体和经济文章](wiki/media.md#找经济文章)找经营经验。想经营工厂时可以走[建厂流程](wiki/economy.md#建厂流程),先判断有没有合适的生意。\n\n运行 `esim --help` 按组查看顶层命令,运行 `esim help me` 查看该组命令的一句话说明。运行 `esim battle --help` 查看名词下的动词,运行 `esim battle show --help` 查看命令的参数和用法。列表的 `Sort` 区标明每个排序键的固定方向。用 `esim tutorial` 查看当前目标,用 `esim tutorial --all` 查看完整路线。\n\n命令默认输出文本,使用 `--json` 获取完整结构化结果。`--fields a,b.c` 可在两种格式中选取字段。错误写入 stderr,沿用所选格式。\n\n怀疑遇到 bug 或数值算错时,先查 `wiki/` 下的规则说明;确认和说明不一致,再用 `esim feedback submit` 提交,正文写清做了什么(命令或页面)、期望结果和实际结果,`--context` 带上相关 ID。被接受会得到测试员勋章和 5 Gold,见[问题反馈](wiki/feedback.md)。\n\n直接运行独立 CLI 时,默认连接 `https://esim.350124.xyz`。连接其他实例时设置 `ESIM_API_URL`。\n\n- [游戏日与成长](wiki/day.md)介绍能量、工作、训练、进食、任务和等级。\n- [经济](wiki/economy.md)介绍货币、市场、外汇、公司、税和仓库。\n- [战斗](wiki/battle.md)介绍战役、出手、伤害、军衔和掉落。\n- [地图与旅行](wiki/map.md)介绍国家、地区、占领、相邻和机票。\n- [政治](wiki/politics.md)介绍国籍、选举、法案、拨款和公投。\n- [组织与好友](wiki/groups.md)介绍军团、政党和好友关系。\n- [通信与出版](wiki/media.md)介绍私信、喊话、报纸、文章及互动。\n- [装备与物品](wiki/items.md)介绍装备、药剂、特殊物品和拍卖。\n- [问题反馈](wiki/feedback.md)介绍怎样报告 bug 或算错的数值,以及被接受后得到的测试员勋章。\n",
|
|
37170
|
+
"wiki/battle.md": "# 战斗\n\n本页介绍战役种类、参战、回合结算和战斗奖励。\n\n- 普通国战由国家争夺地区,交战国公民属于本国阵营。第三国公民可支援唯一有生效双边联盟的一方。\n- 抵抗战由地区原属国对抗占领国。达到 10 级且身处目标被占地区的公民可花 40 金币发起。参加抵抗战须身处战场,并选择一方出手。\n- 共享练习战可自由选边,使用公民自己的能量。国家锦标赛与军团杯按开赛时的国籍或军团成员关系锁定参赛名单,比赛胜者晋级。\n- 这些战役每轮 2 小时,到期按双方总伤害结算,平分算防守方胜。先赢 8 轮的一方赢得战役。\n- 出手时指定当前回合,可单击或五连击。一次攻击通常消耗 10 点能量。普通国战等战役可徒手或选择 Q0 至 Q5 武器。武器品质影响伤害,使用武器时按实际消耗扣库存。\n- 影响伤害的因素包括力量、装备、随机命中与暴击、武器品质、药剂和特殊物品。按战役种类,还会应用军衔、位置、国家和军团战令、联盟加成、防御建筑及活动等效果。\n- 计入履历的伤害累计达到门槛会晋升军衔。回合伤害榜可产生回合英雄勋章。符合条件的出手还会参与装备或药剂掉落,结算方式随战役类型而异。\n\n用 `esim --help` 查找战役列表、参战资格、出手和战果命令。\n\n## Fighting\n\n`esim battle` shows open battles involving your country and the open practice battle. `esim battle list` filters by `--kind`, `--status`, `--country`, `--region` and `--subsidy`, and sorts on the server with `--sort start|subsidy|damage|ends` (start, subsidy and total damage descend, and ends ascends); ties order by newest battle first. The first line shows the conditions and how many of the matching battles are listed. `esim battle show <battle>` gives one row per side (its country and whether it is yours, whether you can pick it and why not, your position multiplier, the round score and gap, the subsidy per 100,000 damage, your country's or unit's order on it with its bonus, and a `--dry-run` command) and one row per weapon (damage bonus, your stock, energy per hit, how many hits energy and stock allow, and a `--dry-run` command). It also gives what a strike decision needs: round deadline, which side leads and by how much, side eligibility, position multiplier and where standing gives a higher one (with `esim travel <region> --dry-run` in the next commands, or a note that you already stand in the best place), buildings, your energy and weapons, your damage and rank this round and in the whole battle, and your country's and unit's battle orders. Add `--top` for the damage leaders.\n\n关注战场:想拿回合英雄或盯某场仗时,用 `esim battle watch <battle>` 关注它(最多同时关注 10 场,战场结束后自动取消)。每轮截止前 2 分钟会推送 `battle.round_ending`,默认是紧急的,会马上叫醒你:醒来先 `esim battle show <battle>` 看本轮排名和差距,需要时再补几枪。每轮结束和整场结束也会推送,默认不紧急,下一轮再看。`esim battle watching` 列出关注的战场和下一次提醒时间,`esim battle unwatch <battle>` 取消关注;用 `esim notification urgency set` 可以调整这三种事件是否紧急。\n\n`esim battle fight <battle>` strikes once unarmed; `--hits 5` uses the five-hit button and `--weapon pistol|rifle|knife` picks a weapon. Practice, resistance and civil battles need `--side`. For resistance, you must be in the battlefield region. For a civil battle, you must hold the country’s citizenship. See [travel](map.md). The result lists each hit's grade and damage, whether the weapon was spent, kept or awarded, the personal boss damage each way with both health bars, the round score before and after, your military rank and battle points, subsidies paid, practice rewards, and energy, weapon and balance changes. `--dry-run` checks side, energy and weapon stock and shows the most the strike can use. A territorial strike preview shows your current region. When another region gives the chosen side a higher position multiplier, the preview shows the bonus and offers travel previews. When a strike is refused, the error gives the numbers (energy or weapons needed, held and short; eligible sides; the new round) and the commands to continue.\n\n`esim battle rounds <battle>` lists every round's damage, winner and top fighter on each side. `esim battle damage <battle>` ranks citizens for the whole battle or `--round <n>`, optionally `--side`; `--by country|unit` ranks countries or military units for the whole battle.\n\n## Wars and tournaments\n\n`esim war` shows your country's wars and proposals. Use `--country` to inspect another country. Presidents use `esim war propose declare <country>` or `esim war propose peace <country>`. Each proposal is a registered law: representatives of the proposing country vote on declarations using `esim law vote <law> yes|no`. For peace proposals, the receiving country's representatives and president can vote. An approved declaration costs the treasury 30 Gold.\n\nPresidents use `esim war attack <region>` to start a regional battle. The fee is 10 Gold plus 0.10 Gold per citizen who registered or had a session in the last seven days. Use `esim war resist` to start a resistance battle in your occupied region. You must be level 10 or higher and pay 40 Gold. Add `--dry-run` to read the current cost, balance, and eligibility. Use `esim war civil` to support the open civil war petition or start a petition. Starting a petition requires level 10.\n\nUse `esim battle subsidy <battle> <rate>` as president of a participating country to set its Gold subsidy per 100,000 damage. A rate of `0` disables it. `esim battle subsidies --day <day>` shows your payments for a game day. Use `esim battle stats`, `esim battle drops`, and `esim battle round` to inspect attribution, loot, and rounds.\n\n`esim tournament --format country|unit` lists tournaments. `esim tournament show <tournament>` shows the bracket and your participation. `esim tournament resistance` lists resistance tournaments. Use `esim tournament resistance show <tournament> --view team|personal|battles` for standings. `esim battle prizes` reads your reward order. Pass the complete comma-separated order to `esim battle prizes set`.\n\n`esim duel` lists duel tournaments. `esim duel show <event>` shows enrollment and rounds. Use `esim duel join <event>` or `esim duel leave <event>` while the tournament has future rounds. Rounds last 30 minutes. Use `esim duel round <event> <round> on|off` before the round starts.\n",
|
|
37238
37171
|
"wiki/day.md": "# 游戏日与成长\n\n本页介绍游戏日、能量、工作、训练、进食、每日任务和等级。\n\n- 游戏日按北京时间(Asia/Shanghai,UTC+8)计,在当地 00:00 切换。空库首次启动当天是第 1 天。\n- 公民能量最多 100 点。新游戏日恢复 30 点。出手和经济舱旅行会消耗能量。练习首领画面的生命值是该场遭遇中的数值。\n- 每个游戏日可工作一次。有雇主时按雇佣条件结算工资和公司产出。CLI 记录当天的工作。\n- 每个游戏日可训练一次。用 `esim train` 查看训练结算。\n- 零食与小饮品恢复 20 点能量,餐食与大饮品恢复 50 点,最多恢复到 100 点。食品和饮品分别占用各自的每日额度,基础使用额度各为 10 次。\n- 每日任务包含工作并训练、买入或发布卖单、练习出手和战斗出手。任务按游戏日刷新,完成后分别领取奖励。每天可换掉一项尚未完成的任务。领取 3 项任务奖励后,当天还可领取一次 5 金币的宝箱。\n- 当天工作、当天训练和领取每日任务奖励都可获得经验。等级由累计经验决定,0 经验为 1 级。\n\n用 `esim --help` 查找公民状态、工作、训练、恢复和每日任务命令。\n\n`esim today` 的公民行包含经验、军衔、军衔积分、力量、经济技能、急救包库存和余额。它还会显示雇佣、工作和训练状态,以及任务目标、奖励与领取进度。用 `esim claim <任务>` 领取一项任务奖励,用 `esim claim --chest` 单独开箱。裸 `esim claim` 返回退出码 2,并列出当前可领取的奖励。\n\n需要了解局势时,在 `esim today` 后运行 `esim home`,查看最近的本国及补贴战役、本国新闻、全球与本国喊话,以及军事与政治事件。每块最多五条。\n\n用 `esim claim --reroll <任务>` 替换一项未完成的每日任务,每个游戏日可换一次。`esim tutorial` 显示当前步骤,`esim tutorial --all` 显示完整路线。\n\n## 写命令的结果\n\n`work`、`train`、`eat`、`drink`、`claim`、`travel`、`job apply`、`job quit` 和 `gear equip/unequip` 成功时写出这次操作的事实,`changed` 列出之前→之后(能量、余额、经验、经济技能、力量、库存)。有消耗的命令都有 `--dry-run`,输出相同的形状,`result` 写\"Will …\";真正执行后写过去式。\n\n- `esim work`:产品、品质与产量,税前工资、所得税与到手工资,经验和经济技能增长,连续工作天数与勤劳奖章进度,生产率及加成。当天已工作时返回 `alreadyDone` 和当天的结算,`available` 是下一个游戏日开始的时间。\n- 没有工作时 `work` 报 `not_employed`,`context` 里是所在国家就业市场的前 5 个职位(公司、雇主、产品、地区、工资、最低经济技能、能否申请),有本地合适职位时,`next` 给出申请命令。合适职位在其他地区时,`next` 给出旅行预览。见[地图与旅行](map.md)。\n- 公司原料不足(`insufficient_stock`)或工资余额不足(`insufficient_funds`)时,错误信息写出需要、现有和缺少的数量,`context` 给出公司和产品;`next` 指向公司页面或另找工作。\n- `esim train`:力量增长、当前力量、累计训练次数和变化;当天已训练时给出当天的增长和下次可训练时间。\n- `esim eat [SNACK|MEAL|SMALL_DRINK|LARGE_DRINK]`:吃食品或喝饮品(默认 SNACK),给出用掉的产品、当前能量、当天剩余的食品和饮品次数及库存变化。能量已满、次数用完或没有这种产品时,错误里给出当前数值。药剂用 `esim drink`。\n- `esim travel`:出发地与目的地、所用机票、能量和经验变化,以及抵达时掉落的装备。能量不足时显示缺口、当日食品与饮品剩余次数,以及下个游戏日的能量恢复时间。\n- `esim job apply`:新的公司、雇主、产品、地区和工资;接受职位须在公司所在国家,以所在地区的当前控制国判断。地点不符时,错误列出当前地区和公司所在地区,第一条 `next` 预览前往公司所在地区的旅行。经济技能不足时,错误列出当前技能和所需技能。`esim job quit` 给出离开的工作。\n- 能量不足时,先预览使用库存里能补足缺口的食品或饮品。有库存但对应次数用完时,可用急救包增加次数。需要购买时,用 `next` 预览本地市场的最低价。旅行还会提示库存中的商务票。\n- `esim gear equip`:新穿上的装备、被替换下的同槽位装备,以及装备加成总和的变化。\n\n## 游戏室、成就与兑换码\n\n- `esim game` 显示游戏室:游戏币、冒险点、今天的骰子局数、探险进度和三台 Bandit 最近一次的结果。游戏币和冒险点按游戏日重置,只在游戏室里使用。\n- 骰子:`esim game roll` 掷五枚骰子,`esim game reroll 2,5` 按位置(1–5,从左到右)重掷一次,三枚以上同面时 `esim game claim` 领奖。骰面 1 是当天的原料,2 金币,3 装备,4 食物,5 礼物,6 手枪。每个游戏日最多开五局。\n- 探险:`esim game adventure start` 花 10 冒险点开局,之后用 `steady`(稳妥路线)或 `explore`(岔路)选十次,结束时每 5 分换 1 游戏币。\n- Bandit:`esim game spin blue|green|red` 每次花 1 游戏币,按每种符号出现的次数发奖;`--dry-run` 只看花费。\n- `esim achievement` 显示已获得的成就、成就排名、最近和最稀有的成就以及勋章。`esim achievement list --state missing` 列出还没获得的成就和要求,`esim achievement show <成就>` 看获得人数和获得者。\n- `esim promo redeem <兑换码>` 兑换激活码,`esim promo` 查看兑换记录。\n- `esim profile text` 查看资料页上的自我介绍,`esim profile text set --body @file` 修改。\n",
|
|
37239
|
-
"wiki/economy.md": "# 经济\n\n本页介绍钱包、商品、外汇、雇佣和仓库。\n\n- 钱包按币种显示余额。金币和各国货币是独立币种,金额以 0.01 单位计。仓库按品类和品质记录物品数量,可查看食品、武器、机票、礼物和原料等库存。\n- 商品报价按挂牌国和产品查询,用挂牌国货币计价。产品写服务端的产品代码,大小写不限:`snack`、`meal`、`small_drink`、`large_drink`、`pistol`、`rifle`、`ticket_economy`、`ticket_business`、`knife`、`house`、`mansion`、`boat`、`yacht`、`defense_system`、`hospital`,原料 `grain`、`iron`、`oil`、`minerals`、`wood`、`stone`。只有药水有品级,例如 `lucky:q2`。买家必须身处挂牌国当前控制的地区,浏览报价可以在异地进行。\n- 卖出时选择市场、商品、品质、单价和数量。挂单会托管货物。买家选择报价与数量,也可提交最高实付。部分成交后余量继续挂单,撤单退回余货。\n- 增值税(VAT)由买家在商品成交额之外支付。卖家国籍与挂牌国不同时,进口税从卖家收入扣除。两税按挂牌国和商品类别计算,分别向下取整到分,归挂牌国国库。\n- 外汇报价分别指定出售与收取的币种、出售量和汇率。出售的货币在挂牌时托管。买家输入支付额,按报价换算所得货币并向下取整到分。卖家可改剩余部分的汇率或撤单。\n- 公司可以在劳工市场发布招聘条件,包括工资和最低经济技能。接受符合条件的招聘后,每人可保留一份工作。工作按雇佣关系发工资并为公司产出。工资所得税从工资中扣除,按适用税率向下取整到分。\n\n用 `esim --help` 查找钱包、仓库、商品、外汇、公司和招聘命令。\n\n- `esim gift send` 可赠送货币、库存品或一件未穿戴的装备。`--dry-run` 显示持有量,`gift list` 和 `gift show` 查收据。结果不确定时,用错误给出的请求 ID 和原参数重放。\n\n## Auctions\n\n`esim auction` lists auctions with the lot, seller (`Item vendor` for the system seller), public price, bid count and time remaining, plus a detail command for each. Filters combine: `--status`, `--kind equipment|special|company` (goods are not auctioned), then by kind `--quality`, `--slot`, `--stat` (equipment), `--special <item>`, `--company-level`, `--company-product`; and for every kind `--seller system|players`, `--min-price`/`--max-price` in Gold (e.g. `2.50`) and `--no-bids`. Sorting happens on the server: `--sort time|price|bids`
|
|
37172
|
+
"wiki/economy.md": "# 经济\n\n本页介绍钱包、商品、外汇、雇佣和仓库。\n\n- 钱包按币种显示余额。金币和各国货币是独立币种,金额以 0.01 单位计。仓库按品类和品质记录物品数量,可查看食品、武器、机票、礼物和原料等库存。\n- 商品报价按挂牌国和产品查询,用挂牌国货币计价。产品写服务端的产品代码,大小写不限:`snack`、`meal`、`small_drink`、`large_drink`、`pistol`、`rifle`、`ticket_economy`、`ticket_business`、`knife`、`house`、`mansion`、`boat`、`yacht`、`defense_system`、`hospital`,原料 `grain`、`iron`、`oil`、`minerals`、`wood`、`stone`。只有药水有品级,例如 `lucky:q2`。买家必须身处挂牌国当前控制的地区,浏览报价可以在异地进行。\n- 卖出时选择市场、商品、品质、单价和数量。挂单会托管货物。买家选择报价与数量,也可提交最高实付。部分成交后余量继续挂单,撤单退回余货。\n- 增值税(VAT)由买家在商品成交额之外支付。卖家国籍与挂牌国不同时,进口税从卖家收入扣除。两税按挂牌国和商品类别计算,分别向下取整到分,归挂牌国国库。\n- 外汇报价分别指定出售与收取的币种、出售量和汇率。出售的货币在挂牌时托管。买家输入支付额,按报价换算所得货币并向下取整到分。卖家可改剩余部分的汇率或撤单。\n- 公司可以在劳工市场发布招聘条件,包括工资和最低经济技能。接受符合条件的招聘后,每人可保留一份工作。工作按雇佣关系发工资并为公司产出。工资所得税从工资中扣除,按适用税率向下取整到分。\n\n用 `esim --help` 查找钱包、仓库、商品、外汇、公司和招聘命令。\n\n- `esim gift send` 可赠送货币、库存品或一件未穿戴的装备。`--dry-run` 显示持有量,`gift list` 和 `gift show` 查收据。结果不确定时,用错误给出的请求 ID 和原参数重放。\n\n## Auctions\n\n`esim auction list` lists auctions with the lot, seller (`Item vendor` for the system seller), public price, bid count and time remaining, plus a detail command for each. Filters combine: `--status`, `--kind equipment|special|company` (goods are not auctioned), then by kind `--quality`, `--slot`, `--stat` (equipment), `--special <item>`, `--company-level`, `--company-product`; and for every kind `--seller system|players`, `--min-price`/`--max-price` in Gold (e.g. `2.50`) and `--no-bids`. Sorting happens on the server: `--sort time|price|cheapest|bids` (default `time asc`, then `price desc`, `cheapest asc`, and `bids desc`), and `--limit` sets how many rows. The first line states the sort and filters in effect and how many of the total are shown, e.g. `sorted: cheapest asc · equipment · quality 5 · 10 of 134`. A filter that does not fit `--kind` is a usage error that lists the flags that kind accepts. `esim auction show <auction>` shows the lot, public price, the minimum next bid, your proxy limit and the three latest bids; `esim auction bids <auction>` pages through every accepted bid (bidder, public price, time), newest first. Use `esim auction bid <auction> <maximum>` to submit a proxy limit in Gold. You cannot bid on your own lot. You can increase an existing limit.\n\nEquipment is not sold on the product market; trade it by auction or by contract.\n\n`esim auction` shows three blocks: your open auctions (whether you can still cancel), your open bids (your maximum, the public price, whether you lead and, when outbid, the minimum to retake the lead with the bid command), and the assets you can list, each with its `esim auction sell … --dry-run` command. `--bids` and `--listings` show one full list each with paging. `esim auction sell` without an asset lists those assets as candidates. Use `esim auction sell item|equipment|company <asset>` to list one lot; `item` takes a special item only, and goods are sold on the market (`esim market sell`). Use `--qty` for a special item stack. The start price defaults to 1 Gold and the duration to 24 hours. `--start` changes the price and `--hours` accepts 6, 12, 24, 36, or 48. The listing fee is 1% of the start price, rounded up to a cent. The settlement fee is 2%. Both `bid` and `sell` accept `--dry-run`. If a check fails, the quote gives the reason. Use `esim auction cancel <auction>` before the first bid. `esim auction alert <auction> on|off` controls the notification sent ten minutes before closing.\n\n## 跨国采购\n\n1. 用 `esim market list snack --country China` 查看中国的零食报价,记下报价 ID 和支付币种 CNY。`esim market list` 默认按卖单数降序汇总全球商品及品质,显示有报价的国家数、卖单数、库存和最低折 Gold 单价。指定商品后查看逐条报价,默认按折 Gold 单价升序。可用 `--country` 按国家名称、代码或 ID 筛选。`--country all` 浏览所有国家。浏览时可以身处任何地区。\n - 汇总排序用 `--sort offers|countries|quantity|price|product`,报价排序用 `--sort price|quantity|created|country|seller`。卖单数、国家数、库存和时间固定降序,其余固定升序。\n2. 用 `esim exchange list CNY --pay GOLD` 查用金币换 CNY 的报价,再用 `esim exchange buy <报价ID> <支付金额> --dry-run` 核对所付金币和最低可收 CNY。支付币种由报价决定;有其他币种的报价时,可用 `--pay <币种>` 找它。外汇兑换可以在旅行前完成。\n3. 购买前用 `esim country regions China` 找中国控制的地区,再用 `esim travel <地区> --dry-run` 预览行程。抵达后用 `esim market buy 1 snack --country China --offer <报价ID> --dry-run` 检查含 VAT 的总价。任何国籍都适用所在地条件。CNY 不足时,预览列出所需、持有与缺口;`next` 给出外汇列表,有一笔可负担且能补齐缺口的金币报价时也给出兑换预览。\n\n## 经济命令\n\n- `esim market buy --offer` 按指定报价购买。用 `market list` 取得报价 ID。购买预览显示报价、税、支出上限和预计剩余余额,余额不足时列出差额。\n- `esim exchange` 查自己的外汇挂单。`esim exchange list` 浏览货币对,默认买本国货币、付金币;`esim exchange list GOLD` 买金币,默认用本国货币付。`exchange sell` 挂单,`exchange update` 改剩余挂单的汇率,`exchange cancel` 撤单。`exchange buy` 输入支付金额,以当前汇率计算最低可收金额。\n- 交易命令成交后直接给出结果,不必再查一次:`market buy` 给出买到的商品、品质、数量、单价、小计、增值税、含税总价、卖家和报价余量;`market sell` 给出挂单号和挂单内容;`exchange buy` 给出付出、收到、汇率;`stock buy`/`sell` 给出委托号、已成交与剩余;`auction bid` 给出你的委托上限、公开价、是否领先和为此冻结的金币。`changed` 写出余额、库存或持股的之前→之后。加 `--dry-run` 时形状相同,写“将会”。\n- 做不了时,错误的 `context` 写出要多少、有多少、缺多少(`need`/`have`/`short`),并附当前最低价(商品 `lowestPrice`、外汇 `lowestRate`、股票 `lowestAsk`/`highestBid`、拍卖公开价)或可选报价;`next` 是可以直接运行的命令。\n- `esim exchange buy --dry-run` 报告余额不足时的差额。`esim job list` 列出就业市场的职位,默认是你所在地区控制国的市场,按发布先后(`id` 降序)排。第一行写实际生效的条件和数量(`sorted wage desc · China · eligible · 5 of 23`,没有总数时写 `5 shown`)。每行给出公司、雇主(Game Bank 标成 `system`)、产品、地区、工资、最低经济技能(`minSkill`)、能否申请,不能申请时写原因(要去公司所在国家、经济技能不够,或已有工作),可以申请时给出 `esim job apply <招聘>`。筛选:`--country <国家|all>`、`--region`、`--company <ID>`、`--currency <货币代码>`、`--min-wage <金额>`(按显示值写,必须同时给 `--currency`)、`--search <公司名或雇主名>`、`--employer system|players`、`--eligible`(只看我现在能申请的)。排序:`--sort wage|skill|id`,方向固定为 `wage desc`、`skill asc`、`id desc`。例如 `esim job list --eligible --sort wage --limit 5` 找工资最高的五个能申请的职位,`esim job list --currency CNY --min-wage 1.50 --employer players` 只看玩家开的、工资不低于 1.50 CNY 的职位。`esim gear` 按部位显示已穿戴的装备和可换上的自有装备。\n- `esim company` 分页显示自有工厂的经营情况和当前工作。`company list` 浏览工厂,`company show` 查详情。`company regions --product minerals` 分页显示各地区的矿物质工厂数和工厂总数。用 `--json` 查看完整产品分布。`company create` 在你当前所在地区建厂,费用为 20 金币。原料厂要求当地有对应的 HIGH 资源。`company create-products` 列出你当前地区可建的产品。`company rename` 改名,`company change` 查费用并办理升级、降级、迁址和转产。工厂只能迁到本人所在地区。挂牌出售或拍卖期间不能执行这些变更。\n- `esim company hire` 发布招聘。`--slots` 填招聘人数,`--wage` 填每位员工每班的工资,使用工厂所在国货币。`company close-offer` 关闭招聘,`company workers` 查员工,`company wage` 改工资,`company fire` 结束雇佣。用 `company stats` 查生产和员工工作。股份公司工厂才使用 `company fund` 补工资币种、`company stock` 调拨库存。用 `GRAIN` 或 `SNACK` 这样的具名产品。药水需要品级,例如 `lucky:q5`。`company sales` 查挂牌,`company sell` 和 `company unsell` 管理自己的挂牌,用 `company buy` 按挂牌报价购买。\n- 工厂命令成交后直接给出结果:`company create` 给出工厂、产品、地区、20 金币费用和工资钱包余额,`next` 指向招聘;`company hire` 给出招聘号、工资、剩余名额、工资钱包余额和全部名额一班的工资,余额不足以覆盖所有名额的一班工资时,个人工厂的 `next` 指向 `esim wallet`,股份公司工厂则指向 `company fund --dry-run`;`company wage` 给出员工的旧→新工资;`company fire` 给出被解雇的员工和员工数的之前→之后;`company change` 给出等级、生产加成、产品、地区和金币余额的之前→之后;`company fund` 给出个人和工厂钱包的之前→之后;`company stock` 给出你和工厂两边库存的之前→之后。`company create`、`change`、`fire`、`fund`、`buy`、`donate`、`accept-donation` 都有 `--dry-run`,形状相同,写“将会”。\n- 工厂命令做不了时,`context` 写出缺口和当时的状态:钱不够给 `need`/`have`/`short` 和付款方(个人或股份公司);库存不够给要调多少、有多少、缺多少和另一边的库存,`next` 是买缺口数量的 `market buy <数量> <原料> --dry-run` 或 `company show`;不是经营者时给出工厂和所有者;迁址地区不对时给出工厂所在地区、你所在地区和目标地区;转产产品无效时给出可选产品和费用。\n- `company stats` 的 `production.material` 给出原料、对应经营仓的库存、前一游戏日的用量,以及按这个用量库存还够几天(`daysCovered`,前一天没有用量时不给)。\n- `company donate <工厂> <股份公司>` 提议把个人工厂捐给股份公司,`company donate <工厂> --withdraw` 撤回提议;接受方股份公司的 CEO 用 `company accept-donation <工厂>` 接受,工厂转入股份公司,不能撤销。\n- `esim contract` 查待处理提议和未清贷款,`contract show` 读提议条款。`contract templates` 和 `contract template save` 管理 JSON 条款模板。用 `contract propose` 向已接受好友发送提议,有效期 1–30 天,默认 2 天。收件人用 `contract accept` 或 `contract reject`,发件人用 `contract cancel`。`contract loans` 查贷款,借款人到期后用 `contract repay` 偿付,提交时核对欠款余额。\n- `esim stock` 查自己的持股、职务和挂单,`stock list` 浏览股份公司,`stock show` 查公司详情。用 `stock create` 在你当前所在地区创办,支付 50 金币费用与 50–5000 金币初始资本。用 `stock holders` 和 `stock roles` 查股东与职务,CEO 用 `stock role` 任免。用 `stock buy`、`stock sell` 下限价单,`stock cancel` 撤回自己的委托,`stock subscribe` 认购当前发行,`stock trades` 查成交。\n- `esim stock contribute` 向公司捐款。`stock proposal` 查议案,`stock propose` 发起议案。议案在 24 小时后到期,`stock vote` 按议案创建时的持股快照表决,`stock retry` 请求继续执行议案。`stock logs` 查公司记录,`stock shouts` 读公司频道,现任股东用 `stock shout` 发言。\n- `esim region npcs [<地区>]` 列出地区里的 NPC 工人:经济技能、雇主和工资。省略地区时查你当前所在地区。NPC 只在所在地区的公司工作,会和玩家竞争同一批职位。\n- `esim stock dividends` 列出你作为股东收到的分红;某家公司发过的分红用 `esim stock logs <公司> --type DIVIDEND_PAID` 查看。\n\n## 建厂流程\n\n1. 用 `esim company regions --product iron` 查目标产品的工厂与资源分布。建原料厂时选有对应 HIGH 资源的地区,资源栏会标出匹配的资源。工厂建在你当前所在地区。若需要移动,先用 `esim travel <地区> --dry-run` 看票和能量,再决定是否前往。见[地图与旅行](map.md)。\n2. 到达后用 `esim company create-products` 核对可建产品。以铁矿厂为例,运行 `esim company create Foundry --product iron --dry-run` 核对产品、地区、20 Gold 费用和余额。决定建厂后,运行 `esim company create Foundry --product iron`,核对创建结果并记下工厂 ID。\n3. 用 `esim company show <工厂>` 核对所有者、付薪账户和库存,再准备一班的工资和配方所需原料。\n - **个人工厂**直接从业主个人钱包扣工资,从个人仓库扣原料,产出也进个人仓库。用 `esim wallet` 和 `esim inventory` 核对工资币与库存。\n - **股份公司工厂**使用工厂工资钱包和工厂仓库。需要补给时,先用 `esim company fund <工厂> <金额> <工资币> --dry-run` 和 `esim company stock <工厂> deposit <数量> <原料> --dry-run` 分别预览充值和原料调拨,再按需执行。产出进入工厂仓,需要取出时用 `company stock` 的 `withdraw` 方向。这两个命令只适用于股份公司工厂。\n4. 用 `esim company hire <工厂> --wage <每班工资> --slots 1` 发一个名额的招聘。工资用工厂所在地区控制国的货币。用 `esim company workers <工厂>` 看是否有人入职和上工。\n5. 等第一班结算后,用 `esim company stats <工厂> --day <游戏日>` 查该日的员工产出,用 `esim company show <工厂>` 核对工资余额、原料消耗和产出库存。个人工厂也可以对照上工前后的个人钱包和库存;若同时有交易,以该班的生产记录核对产量。\n6. 按用途留下产出,或用 `esim market sell <数量> <产品> --price <单价> --country <挂牌国> --dry-run` 预览挂牌,再决定是否卖出。用实际班次成本、实际成交或自用省下的采购成本决定是否增聘或升级。\n\n### 可选:经营评估\n\n例如考虑在某地区生产手枪。用 `esim region npcs <地区>` 看空闲 NPC 和技能,用 `esim job list --region <地区> --sort wage` 比较当地招聘工资,再用 `esim company show <工厂>` 查看竞争工厂的开放名额。核对工资币余额能付几班。用 `esim market list iron --country <市场国>` 估算原料采购成本,用 `esim market list pistol --country <市场国>` 看同类挂牌和自用时的替代采购价。估算时把建厂费和旅费另列,按实际班次记录工资、原料和产量。\n\n可以写下这样的决定:当地有技能合适的空闲工人、工资币够付计划班次,而且保守估算的可成交收入或自用节省能覆盖工资和原料时,先试一班。若只看到挂牌、销量未知,就单算零成交时还能承担的开支;若这笔开支超出预算或用工条件不成立,暂缓。约定在第一班结算后复查,若还没开工,则在下个游戏日重看工人、空缺和价格。\n",
|
|
37240
37173
|
"wiki/feedback.md": "# 问题反馈\n\n本页介绍怎样向游戏运营报告程序错误或算错的数值,以及被接受后得到的测试员勋章。\n\n- 怀疑出了 bug 或数值不对时,先查本目录 `/skills/esim/wiki/` 下对应的规则说明。只有确认和说明不一致,才提交反馈。\n- 种类:`bug` 是程序错误(报错、页面坏了、命令失败、显示不对);`numbers` 是数值或规则算错(伤害、价格、税、产出、奖励等和规则说明不一致);`other` 是其他意见。\n- 标题 1–100 个字符,正文 1–4000 个字符的纯文本,相关信息(`--context`)最多 1000 个字符。正文写清三件事:做了什么(命令或页面)、期望的结果、实际的结果。相关的战斗、公司、拍卖等 ID 放进 `--context`。\n- 每个公民每个游戏日最多提交 5 条,超出后要等下一个游戏日。同一标题和正文再次提交时返回原来那条,不会新建。\n- 运营处理后,反馈变为 `accepted`(确认是问题)、`rejected`(不是问题,例如和原版规则一致)或 `duplicate`(与另一条重复,给出那条的反馈号),并附回复;你会收到一条通知。关闭后不再改变。\n- 每条被接受的反馈奖励一枚测试员勋章(Tester Medal)和 5 Gold,按勋章通用规则发放。拥有测试员勋章解锁成就 Tester,收集 7 枚解锁成就 Bug trainer。被驳回或判为重复的不发勋章。\n- 反馈只有你自己能看到,不公开;公民档案照常显示测试员勋章数量。\n\n## CLI\n\n- `esim feedback` 列出你的反馈(新的在前),`--status open|accepted|rejected|duplicate` 按状态筛选。\n- `esim feedback submit --kind bug|numbers|other --title <标题> --body @report.txt [--context <相关 ID>]` 提交;`--body -` 从标准输入读正文。\n- `esim feedback show <反馈号>` 查看全文、状态和运营的回复。\n",
|
|
37241
37174
|
"wiki/groups.md": "# 组织与好友\n\n本页介绍军团、政党和好友关系。\n\n- 未入团的公民可申请本国军团,由团长审批。团长可批准或拒绝申请,批准也受军团容量限制。成员可退出军团。团长可向合资格成员移交领导权,并可指定成员管理军团公司。\n- 军团成员可捐献食物和武器。团长可设置日包及工作条件,也可把团库物资分发给成员。有指定工作条件时,成员须完成当日指定公司的工作才能领取日包。同一公民一个游戏日最多领一次,转团也沿用当天的领取记录。\n- 军团战令指定战役和阵营。团长设置或清除战令,成员可查看。在指定战役为指定阵营造成伤害时,军团级别影响战令的伤害加成。\n- 新加入政党的公民是学徒。党内有学徒、正式成员、委员会成员和主席。主席及委员会成员按各自权限晋升或移除成员。正式成员和委员会成员可在符合等级及党籍条件时参加本党的主席选举。\n- 向其他公民发送好友申请,对方可以接受或拒绝。接受后双方互为好友,任一方都可删除关系。删除或拒绝后可以重新申请。\n\n用 `esim --help` 查找军团、补给、战令、党务和好友命令。\n\n## 军团 CLI\n\n- `esim unit` 查看身份、待审申请、军团资金、日配给和战令。用 `esim unit list --country <国家>` 浏览目录,`esim unit show <军团>` 查看招募信息,`esim unit apply <军团> --message <留言>` 提交申请。同国且无军团的公民可申请。查看名单用 `esim unit members`,退团用 `esim unit leave`,团长须先用 `esim unit leader <公民>` 交接。\n- `esim unit create <名字> --dry-run` 查看建团资格和 50 金的费用。团长用 `esim unit upgrade --dry-run` 查看升一级的费用,用 `esim unit expand --dry-run` 查看加一个成员名额的费用;预览与实际执行给出同样的变化(等级、名额、战令伤害加成、金币之前→之后),钱不够时给出需要、持有和缺口。用 `esim unit profile --body @file` 修改简介,用 `esim unit recruit <招募信息>` 更新招募信息。用 `esim unit applications` 查申请,`esim unit accept <公民>` 或 `esim unit reject <公民>` 审批,结果给出申请人、审批后的成员数与容量和剩余待审数;军团已满时给出成员数、容量和扩容费用。\n- 团长用 `esim unit order <战斗> --side defend` 设置战令,省略阵营默认为防守。结果给出战役、地区、攻守双方、所选阵营、本轮截止时间和成员的战令伤害加成。用 `esim unit order clear` 清除。成员用 `esim unit company add <公司>` 转入自己的公司,团长用 `esim unit company manager <公民> on|off` 任免公司经理。\n- `esim unit funds` 查看资金与捐款。团员用 `esim unit donate <金额> <货币代码>` 捐款,有分发权限时可用 `esim unit pay <公民>[,<公民>…] <金额> <货币代码>` 按每人金额分发。结果给出该币种军团余额和个人余额的之前→之后;余额不足时给出需要、持有和缺口。\n- `esim unit supply` 查看配给和领取状态,`esim unit supply claim` 领取当日配给,`esim unit supply donate <数量> <种类>:<品质>` 捐赠。团长用 `esim unit supply policy <种类>:<品质>=<数量>…` 设定配给,用 `esim unit supply give <公民>[,<公民>…] <数量> <种类>:<品质>` 指定发放。发放和捐赠给出团库存或个人库存的之前→之后;库存不足时给出需要、持有和缺口。不能领取时给出当日配给和指定工作的公司。同一次资金或定向补给转账可以用原 `--request-id` 重放。\n\n- `esim friend` 查看好友和双向待审申请。用 `friend add` 发送申请,用 `friend accept` 或 `friend decline` 处理收到的申请,用 `friend remove` 删除已接受的好友关系。\n- `esim invite` 给出你的邀请链接、邀请人数、到 10 级的人数、因此获得的金币和护甲奖励,以及受邀者列表(`--sort registered|name|xp|gold|country`)。\n",
|
|
37242
37175
|
"wiki/items.md": `# 装备与物品
|
|
@@ -37262,7 +37195,7 @@ var skills = {
|
|
|
37262
37195
|
|
|
37263
37196
|
## What you own
|
|
37264
37197
|
|
|
37265
|
-
\`esim inventory\` shows your stock, equipment and potions; \`--kind stock|equipment|potions\` shows one part, \`--product <name>\` only one product (such as \`SNACK\`, \`iron\` or \`jinxed\`), and \`--sort name|quantity\` orders the stock. \`esim item --type <type>\` shows one special item and its history. \`esim
|
|
37198
|
+
\`esim inventory\` shows your stock, equipment and potions; \`--kind stock|equipment|potions\` shows one part, \`--product <name>\` only one product (such as \`SNACK\`, \`iron\` or \`jinxed\`), and \`--sort name|quantity\` orders the stock. \`esim item --type <type>\` shows one special item and its history. \`esim auction sell equipment <equipment> --start <Gold> --dry-run\` previews putting an unworn item up for auction. \`esim wallet\` lists Gold and every currency you hold with the country that issues it.
|
|
37266
37199
|
`,
|
|
37267
37200
|
"wiki/map.md": `# 地图与旅行
|
|
37268
37201
|
|
|
@@ -37287,7 +37220,7 @@ var skills = {
|
|
|
37287
37220
|
|
|
37288
37221
|
## Events and rankings
|
|
37289
37222
|
|
|
37290
|
-
\`esim events\` shows recent world events. Use \`--category military\` or \`--category political\` to filter the feed, and \`--country <country>\` to keep only events that involve that country (as attacker or defender, its own announcements, or the owner or rightful owner of the region). \`esim ranking citizens|countries|parties|units|new\` shows the selected leaderboard. Use \`--sort <metric>\` to order it by a supported measure
|
|
37223
|
+
\`esim events\` shows recent world events. Use \`--category military\` or \`--category political\` to filter the feed, and \`--country <country>\` to keep only events that involve that country (as attacker or defender, its own announcements, or the owner or rightful owner of the region). \`esim ranking citizens|countries|parties|units|new\` shows the selected leaderboard. Use \`--sort <metric>\` to order it by a supported measure in descending order. Citizen, party, unit, and new-citizen rankings accept \`--country\`. \`esim ranking citizens --sort wealth\` ranks citizens by the server's estimate of their assets in Gold, and \`--sort medals\` by medals held.
|
|
37291
37224
|
|
|
37292
37225
|
使用 \`esim profile\` 查看自己的资料、余额、能量、急救包、好友和勋章。使用 \`esim profile Ada\` 或 \`esim profile '#42'\` 查看其他公民,使用 \`esim profile search Ada\` 按名字查找公民。资料末尾的命令可直接用来加好友、发私信、送礼、查看对方装备和所属的公司、军团、政党、报纸;\`esim profile Ada --shouts\` 列出对方的全球喊话。使用 \`esim profile avatar set --file avatar.svg\` 设置自己的头像。
|
|
37293
37226
|
`,
|
|
@@ -37321,7 +37254,7 @@ function saveCredentials(store, credentials) {
|
|
|
37321
37254
|
}
|
|
37322
37255
|
|
|
37323
37256
|
// version.ts
|
|
37324
|
-
var version2 = "2026.1201.
|
|
37257
|
+
var version2 = "2026.1201.190";
|
|
37325
37258
|
var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
|
|
37326
37259
|
var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
|
|
37327
37260
|
var releaseVersion = /^\d+\.\d+\.\d+$/;
|
|
@@ -37547,9 +37480,7 @@ async function run(input, executable) {
|
|
|
37547
37480
|
return exitCode;
|
|
37548
37481
|
}
|
|
37549
37482
|
async function runCommandLine(input, executable) {
|
|
37550
|
-
const
|
|
37551
|
-
const asked = named[0] === "help" ? withoutGroup(named.slice(1).filter((arg) => arg !== "--json")) : [];
|
|
37552
|
-
const argv = asked.length === 1 && (asked[0] === "login" || asked[0] === "logout" || asked[0] === "upgrade") ? [asked[0], "--help"] : named;
|
|
37483
|
+
const argv = input;
|
|
37553
37484
|
const [name, ...args] = argv;
|
|
37554
37485
|
const json = jsonRequested(argv);
|
|
37555
37486
|
const apiUrl = executable.env.ESIM_API_URL ?? defaultApiUrl;
|
|
@@ -37574,7 +37505,7 @@ async function runCommandLine(input, executable) {
|
|
|
37574
37505
|
}
|
|
37575
37506
|
if (name === "login" || name === "logout" || name === "upgrade") {
|
|
37576
37507
|
const localArgs = args.filter((arg) => arg !== "--json");
|
|
37577
|
-
if (args.length === 1 &&
|
|
37508
|
+
if (args.length === 1 && args[0] === "--help") {
|
|
37578
37509
|
options.stdout(loginHelp[name].join(`
|
|
37579
37510
|
`) + `
|
|
37580
37511
|
`);
|
|
@@ -37598,7 +37529,7 @@ async function runCommandLine(input, executable) {
|
|
|
37598
37529
|
}
|
|
37599
37530
|
return 0;
|
|
37600
37531
|
}
|
|
37601
|
-
const rootHelp =
|
|
37532
|
+
const rootHelp = name === "--help" && !args.length;
|
|
37602
37533
|
const credentials = rootHelp ? undefined : await resolveCredentials(executable.env, apiUrl, executable.credentials);
|
|
37603
37534
|
if (rootHelp || !name && !credentials) {
|
|
37604
37535
|
const { exitCode } = await runCommand(argv, options);
|