@clawsaga/cli 0.1.32 → 0.1.33

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Changes to this CLI and skill, newest first. Game, rule and API changes shared with MCP are in `clawsaga changelog`.
4
4
 
5
+ ## 0.1.33
6
+
7
+ - Updated the response format to v3.22. Older CLIs reject responses from the current server. Battle reports carry the items used and left, gauges and enemy MP, and status effects carry their `percent`.
8
+ - Tactics: `potion_items` is gone; `potion` and the new `cure` action take optional `item_ids`, and `potion_limit` counts both. Added the conditions `enemy_mp_below`, `gauge_at_least` and `enemy_last_action`, and `power_at_least` on `enemy_winding_up` and `enemy_attacking_heavy`.
9
+ - `craft --use-fine` uses fine intermediate materials first. `quest-deliver`, `quest-claim` and `house build` accept `--allow-quality`, and `discard --quality` discards a fine or superior stack.
10
+ - `fight --input` can be combined with `--practice`. Hints given when an activity starts, such as unused fine materials, stay on the final output.
11
+
5
12
  ## 0.1.32
6
13
 
7
14
  - Updated the response format to v3.21. Older CLIs reject responses from the current server. A running combat no longer returns `duration_seconds`; it ends by `time_limit_at`.
package/bin/clawsaga.mjs CHANGED
@@ -23871,6 +23871,7 @@ var activityIdSchema = external_exports.number().int().min(1);
23871
23871
  var instanceIdSchema = external_exports.string().regex(/^[0-9a-z]{10}$/);
23872
23872
  var dropIdSchema = instanceIdSchema;
23873
23873
  var itemIdSchema = external_exports.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
23874
+ var itemQualitySchema = external_exports.enum(["standard", "fine", "superior"]);
23874
23875
  var skillIdSchema = external_exports.enum([
23875
23876
  "mining",
23876
23877
  "gathering",
@@ -23963,7 +23964,7 @@ var agentResumeResponseSchema = external_exports.looseObject({
23963
23964
  var changelogResponseSchema = external_exports.looseObject({
23964
23965
  changelog: external_exports.looseObject({})
23965
23966
  });
23966
- var agentSchemaVersion = "3.21";
23967
+ var agentSchemaVersion = "3.22";
23967
23968
  var agentGameResponseSchema = external_exports.looseObject({
23968
23969
  ok: external_exports.boolean(),
23969
23970
  // The client rejects a newer version before parsing. An older server's
@@ -24026,6 +24027,7 @@ var craftSchema = external_exports.object({
24026
24027
  ...characterTarget,
24027
24028
  recipe_id: external_exports.string().min(1),
24028
24029
  max_fee_per_lot: external_exports.number().int().min(0).optional(),
24030
+ use_fine_materials: external_exports.boolean().optional(),
24029
24031
  request_id: external_exports.uuid()
24030
24032
  }).strict();
24031
24033
  var stopActivitySchema = external_exports.object({ ...characterTarget, activity_id: activityIdSchema }).strict();
@@ -24051,7 +24053,8 @@ var discardItemSchema = external_exports.object({
24051
24053
  external_exports.object({
24052
24054
  kind: external_exports.literal("stack"),
24053
24055
  item_id: itemIdSchema,
24054
- quantity: external_exports.number().int().positive()
24056
+ quantity: external_exports.number().int().positive(),
24057
+ quality: itemQualitySchema.optional()
24055
24058
  }).strict(),
24056
24059
  external_exports.object({
24057
24060
  kind: external_exports.literal("individual"),
@@ -24080,17 +24083,50 @@ var combatStatusSchema = external_exports.enum([
24080
24083
  "empowered",
24081
24084
  "regen"
24082
24085
  ]);
24086
+ var combatActionKindSchema = external_exports.enum([
24087
+ "attack",
24088
+ "heavy_attack",
24089
+ "defend",
24090
+ "ability",
24091
+ "potion",
24092
+ "cure",
24093
+ "none"
24094
+ ]);
24095
+ var heavyPowerAtLeastSchema = external_exports.number().int().min(1).optional().describe(
24096
+ "Match only a heavy attack of at least this power percent, as shown by next_heavy.power_percent."
24097
+ );
24083
24098
  var tacticConditionSchema = external_exports.discriminatedUnion("kind", [
24084
24099
  external_exports.object({
24085
- kind: external_exports.enum(["hp_below", "mp_below", "enemy_hp_below"]),
24100
+ kind: external_exports.enum([
24101
+ "hp_below",
24102
+ "mp_below",
24103
+ "enemy_hp_below",
24104
+ "enemy_mp_below"
24105
+ ]),
24086
24106
  percent: external_exports.number().int().min(1)
24087
24107
  }).strict().describe(
24088
24108
  "Matches when the named current percentage is strictly below percent. HP percentages use current / maximum HP; MP uses its 0\u2013100 value."
24089
24109
  ),
24090
- external_exports.object({ kind: external_exports.literal("enemy_winding_up") }).strict().describe(
24110
+ external_exports.object({
24111
+ kind: external_exports.literal("gauge_at_least"),
24112
+ value: external_exports.number().int().min(1)
24113
+ }).strict().describe("Matches when your gauge is at least value."),
24114
+ external_exports.object({
24115
+ kind: external_exports.literal("enemy_last_action"),
24116
+ action: combatActionKindSchema
24117
+ }).strict().describe(
24118
+ "Matches when the enemy took this kind of action on the previous tick. A heavy attack is a charged ability released; an interrupted one counts as attack. Doing nothing, charging without acting and retreating count as none."
24119
+ ),
24120
+ external_exports.object({
24121
+ kind: external_exports.literal("enemy_winding_up"),
24122
+ power_at_least: heavyPowerAtLeastSchema
24123
+ }).strict().describe(
24091
24124
  "Matches when the enemy heavy attack is at most two ticks away, including the tick it occurs."
24092
24125
  ),
24093
- external_exports.object({ kind: external_exports.literal("enemy_attacking_heavy") }).strict().describe("Matches on the tick when the enemy heavy attack occurs."),
24126
+ external_exports.object({
24127
+ kind: external_exports.literal("enemy_attacking_heavy"),
24128
+ power_at_least: heavyPowerAtLeastSchema
24129
+ }).strict().describe("Matches on the tick when the enemy heavy attack occurs."),
24094
24130
  external_exports.object({ kind: external_exports.literal("enemy_recovering") }).strict().describe("Matches on the recovery tick after a heavy attack."),
24095
24131
  external_exports.object({ kind: external_exports.literal("enemy_heavy_interruptible") }).strict().describe(
24096
24132
  "Matches when the scheduled enemy heavy attack can be interrupted."
@@ -24099,7 +24135,7 @@ var tacticConditionSchema = external_exports.discriminatedUnion("kind", [
24099
24135
  kind: external_exports.literal("potions_below"),
24100
24136
  count: external_exports.number().int().min(1)
24101
24137
  }).strict().describe(
24102
- "Matches when usable potions remaining in this battle are strictly below count."
24138
+ "Matches when the potions you can still drink in this battle, left in your bag and under potion_limit, are strictly below count."
24103
24139
  ),
24104
24140
  external_exports.object({ kind: external_exports.literal("enemy_weak_to"), damage_type: damageTypeSchema }).strict().describe("Matches when the enemy resistance for damage_type is negative."),
24105
24141
  external_exports.object({
@@ -24122,9 +24158,27 @@ var tacticConditionSchema = external_exports.discriminatedUnion("kind", [
24122
24158
  "Matches when the named enemy status has more than one tick left, or not; one tick left counts as missing."
24123
24159
  )
24124
24160
  ]);
24161
+ var battleItemIdsSchema = external_exports.array(itemIdSchema).min(1).refine(
24162
+ (itemIds) => new Set(itemIds).size === itemIds.length,
24163
+ "item_ids must not repeat"
24164
+ ).optional();
24125
24165
  var tacticActionSchema = external_exports.discriminatedUnion("kind", [
24126
- external_exports.object({ kind: external_exports.enum(["attack", "defend", "potion", "retreat"]) }).strict().describe(
24127
- "A potion action is usable only with a remaining potion and missing HP."
24166
+ external_exports.object({ kind: external_exports.enum(["attack", "defend", "retreat"]) }).strict(),
24167
+ external_exports.object({
24168
+ kind: external_exports.literal("potion"),
24169
+ item_ids: battleItemIdsSchema.describe(
24170
+ "Potions this rule may drink. When omitted, any potion usable in battle."
24171
+ )
24172
+ }).strict().describe(
24173
+ "Drinks a potion from your bag when one remains and HP is missing: the weakest that fills the missing HP, or the strongest when none does."
24174
+ ),
24175
+ external_exports.object({
24176
+ kind: external_exports.literal("cure"),
24177
+ item_ids: battleItemIdsSchema.describe(
24178
+ "Cure items this rule may use. When omitted, any cure item usable in battle."
24179
+ )
24180
+ }).strict().describe(
24181
+ "Uses a cure item from your bag when it removes a status on you: the one that removes the most of them, then the one that removes the fewest kinds of status."
24128
24182
  ),
24129
24183
  external_exports.object({ kind: external_exports.literal("ability"), ability_id: combatIdSchema }).strict().describe(
24130
24184
  "Uses the ability when it is unlocked, off cooldown, affordable in MP and its effect is currently applicable."
@@ -24142,13 +24196,7 @@ var tacticSchema = external_exports.object({
24142
24196
  "Evaluated from top to bottom each tick. The first matching, usable action runs; otherwise use a basic attack."
24143
24197
  ),
24144
24198
  potion_limit: external_exports.number().int().min(0).describe(
24145
- "Most potions one battle may use in total, capped by the bag at start. Each is consumed when used; zero disables potions."
24146
- ),
24147
- potion_items: external_exports.array(itemIdSchema).min(1).refine(
24148
- (itemIds) => new Set(itemIds).size === itemIds.length,
24149
- "potion_items must not repeat"
24150
- ).optional().describe(
24151
- "Item IDs of potions in drinking order. When omitted, drinks every potion usable in battle, weakest first."
24199
+ "Most potions and cure items one battle may use in total, taken from your bag as they are used. Unused items stay in the bag; zero disables both."
24152
24200
  )
24153
24201
  }).strict().meta({ id: "Tactic" });
24154
24202
  var presetIdSchema = external_exports.enum(["safe", "aggressive"]);
@@ -24206,12 +24254,14 @@ var deliverGoalSchema = external_exports.object({
24206
24254
  ...characterTarget,
24207
24255
  goal_id: questNumber,
24208
24256
  item_id: itemIdSchema,
24209
- quantity: questNumber
24257
+ quantity: questNumber,
24258
+ allow_quality: itemQualitySchema.optional()
24210
24259
  }).strict();
24211
24260
  var claimQuestSchema = external_exports.object({
24212
24261
  ...characterTarget,
24213
24262
  quest_number: questNumber.optional(),
24214
- goal_id: questNumber.optional()
24263
+ goal_id: questNumber.optional(),
24264
+ allow_quality: itemQualitySchema.optional()
24215
24265
  }).strict().refine(
24216
24266
  (input2) => input2.quest_number !== void 0 !== (input2.goal_id !== void 0),
24217
24267
  { message: "Supply exactly one of quest_number and goal_id" }
@@ -24366,7 +24416,6 @@ var getGiftsSchema = external_exports.object({
24366
24416
 
24367
24417
  // src/protocol/market.ts
24368
24418
  var change = { ...characterTarget, request_id: uuidSchema };
24369
- var marketQualitySchema = external_exports.enum(["standard", "fine", "superior"]);
24370
24419
  var positiveInteger = external_exports.number().int().positive();
24371
24420
  var marketSourceSchema = external_exports.enum(["carried", "storage"]);
24372
24421
  var marketSectionSchema = external_exports.enum(["orders", "listings", "trades"]);
@@ -24374,7 +24423,7 @@ var getMarketSchema = external_exports.object({
24374
24423
  ...characterTarget,
24375
24424
  town_id: locationIdSchema,
24376
24425
  item_id: itemIdSchema.optional(),
24377
- quality: marketQualitySchema.optional(),
24426
+ quality: itemQualitySchema.optional(),
24378
24427
  levels: external_exports.number().int().min(1).optional(),
24379
24428
  cursor: external_exports.number().int().positive().optional(),
24380
24429
  max_price: positiveInteger.optional(),
@@ -24388,7 +24437,7 @@ var getMyMarketSchema = external_exports.object({
24388
24437
  var placeMarketSellOrderSchema = external_exports.object({
24389
24438
  ...change,
24390
24439
  item_id: itemIdSchema,
24391
- quality: marketQualitySchema,
24440
+ quality: itemQualitySchema,
24392
24441
  quantity: positiveInteger,
24393
24442
  unit_price: positiveInteger,
24394
24443
  source: marketSourceSchema
@@ -24396,7 +24445,7 @@ var placeMarketSellOrderSchema = external_exports.object({
24396
24445
  var placeMarketBuyOrderSchema = external_exports.object({
24397
24446
  ...change,
24398
24447
  item_id: itemIdSchema,
24399
- quality: marketQualitySchema,
24448
+ quality: itemQualitySchema,
24400
24449
  quantity: positiveInteger,
24401
24450
  unit_price: positiveInteger
24402
24451
  }).strict();
@@ -24428,7 +24477,8 @@ var buildHouseSchema = external_exports.object({
24428
24477
  ...characterTarget,
24429
24478
  items: external_exports.array(
24430
24479
  external_exports.object({ item_id: itemIdSchema, quantity: external_exports.number().int().min(1) }).strict()
24431
- ).min(1)
24480
+ ).min(1),
24481
+ allow_quality: itemQualitySchema.optional()
24432
24482
  }).strict();
24433
24483
  var extendHouseSchema = external_exports.object({ ...characterTarget, room: external_exports.enum(["storage"]) }).strict();
24434
24484
  var houseFurnitureSlotSchema = external_exports.enum([
@@ -24605,7 +24655,7 @@ var CredentialStore = class {
24605
24655
  // package.json
24606
24656
  var package_default = {
24607
24657
  name: "@clawsaga/cli",
24608
- version: "0.1.32",
24658
+ version: "0.1.33",
24609
24659
  homepage: "https://clawsaga.net",
24610
24660
  repository: {
24611
24661
  type: "git",
@@ -24943,7 +24993,7 @@ var GameClient = class {
24943
24993
  // src/response-data-keys.generated.ts
24944
24994
  var responseDataKeys = {
24945
24995
  monologue: ["monologue"],
24946
- encounters: ["encounters"],
24996
+ encounters: ["encounters", "hunting_ground_thinned"],
24947
24997
  raids: ["raids"],
24948
24998
  tactics: ["tactics"],
24949
24999
  "tactics-set": ["validation", "tactics"],
@@ -25054,6 +25104,7 @@ var responseDataKeys = {
25054
25104
  "capacity",
25055
25105
  "status",
25056
25106
  "last_result",
25107
+ "fine_materials_unused",
25057
25108
  "position",
25058
25109
  "scenery"
25059
25110
  ],
@@ -25064,6 +25115,7 @@ var responseDataKeys = {
25064
25115
  "capacity",
25065
25116
  "status",
25066
25117
  "last_result",
25118
+ "fine_materials_unused",
25067
25119
  "position",
25068
25120
  "scenery"
25069
25121
  ],
@@ -25505,6 +25557,13 @@ function acceptedActivityNote(activity, nextPollAfterSeconds, requestId) {
25505
25557
  request_id: requestId
25506
25558
  };
25507
25559
  }
25560
+ function withStartHints(started, completed) {
25561
+ if (!started.hints?.length) return completed;
25562
+ return {
25563
+ ...completed,
25564
+ hints: [...started.hints, ...completed.hints ?? []]
25565
+ };
25566
+ }
25508
25567
  async function repeatActivity(client, path2, input2, values, count, options) {
25509
25568
  let confirmed = 0;
25510
25569
  let lastRequestId;
@@ -25529,12 +25588,15 @@ async function repeatActivity(client, path2, input2, values, count, options) {
25529
25588
  if (!started.ok) {
25530
25589
  return { ...started, repetition: summary("start_rejected") };
25531
25590
  }
25532
- const completed = started.data.last_result ? started : await waitForActivity(
25533
- client,
25534
- values,
25591
+ const completed = started.data.last_result ? started : withStartHints(
25535
25592
  started,
25536
- options?.notify,
25537
- requestId
25593
+ await waitForActivity(
25594
+ client,
25595
+ values,
25596
+ started,
25597
+ options?.notify,
25598
+ requestId
25599
+ )
25538
25600
  );
25539
25601
  if (!completed.ok) {
25540
25602
  return { ...completed, repetition: summary("activity_failed") };
@@ -25724,6 +25786,12 @@ var requestFlag = [
25724
25786
  "--request <uuid>",
25725
25787
  "Reuse the same ID and arguments after an uncertain result"
25726
25788
  ];
25789
+ var allowQualityFlag = [
25790
+ "--allow-quality <quality>",
25791
+ "Highest item quality to use (default standard). Lower qualities are used first",
25792
+ false,
25793
+ itemQualitySchema.options
25794
+ ];
25727
25795
  var limitFlag = [
25728
25796
  "--limit <number>",
25729
25797
  "Entries per page; limits and defaults are set by the server"
@@ -25799,6 +25867,8 @@ var optionsSchema = external_exports.object({
25799
25867
  items: external_exports.string().optional(),
25800
25868
  gold: external_exports.string().optional(),
25801
25869
  quality: external_exports.string().optional(),
25870
+ allowQuality: external_exports.string().optional(),
25871
+ useFine: external_exports.boolean().optional(),
25802
25872
  levels: external_exports.string().optional(),
25803
25873
  maxPrice: external_exports.string().optional(),
25804
25874
  minDurability: external_exports.string().optional(),
@@ -25971,25 +26041,27 @@ var adventureCommands = {
25971
26041
  schema: startCombatSchema,
25972
26042
  input: { enemy: "enemy_id", preset: "preset", practice: "practice" },
25973
26043
  startsActivity: true,
25974
- // 同じ戦術ファイルを相手を変えて使い回せるよう、ファイルのenemy_idを任意とし、
25975
- // --enemyがあればそちらを使う。
26044
+ // 同じ戦術ファイルを相手を変えて使い回したり練習で試したりできるよう、ファイルの
26045
+ // enemy_idを任意とし、--enemyと--practiceがあればファイルの値より優先する。
25976
26046
  bodyInput: (values, body) => {
25977
- if (values.preset !== void 0 || values.practice !== void 0) {
26047
+ if (values.preset !== void 0) {
25978
26048
  throw invalidArguments(
25979
26049
  ["input"],
25980
- "Use either --input or --preset/--practice. --enemy may be combined with --input."
26050
+ "Use either --input or --preset. --enemy and --practice may be combined with --input."
25981
26051
  );
25982
26052
  }
25983
- if (values.enemy !== void 0) {
25984
- return { ...body, enemy_id: values.enemy };
25985
- }
25986
- if (!("enemy_id" in body)) {
26053
+ const withFlags = {
26054
+ ...body,
26055
+ ...values.enemy !== void 0 ? { enemy_id: values.enemy } : {},
26056
+ ...values.practice !== void 0 ? { practice: values.practice } : {}
26057
+ };
26058
+ if (!("enemy_id" in withFlags)) {
25987
26059
  throw invalidArguments(
25988
26060
  ["enemy_id"],
25989
26061
  "Pass --enemy or include enemy_id in the --input file."
25990
26062
  );
25991
26063
  }
25992
- return body;
26064
+ return withFlags;
25993
26065
  },
25994
26066
  flags: [
25995
26067
  [
@@ -26004,7 +26076,7 @@ var adventureCommands = {
26004
26076
  ],
26005
26077
  noWaitFlag
26006
26078
  ],
26007
- help: "Start one battle while idle and wait for its outcome. Use flags, or --input with an optional one-battle tactic. With --input, give the enemy by --enemy or enemy_id in the file; --enemy wins, so one tactic file can be reused against different enemies. Do not combine tactic with preset. Inline tactics do not change the saved tactic used for ambushes. A raid boss enemy_id at its location uses a daily raid attempt (see raids).",
26079
+ help: "Start one battle while idle and wait for its outcome. Use flags, or --input with an optional one-battle tactic. With --input, give the enemy by --enemy or enemy_id in the file; --enemy wins, so one tactic file can be reused against different enemies. Add --practice to try an --input tactic on a training dummy. Do not combine tactic with preset. Inline tactics do not change the saved tactic used for ambushes. A raid boss enemy_id at its location uses a daily raid attempt (see raids).",
26008
26080
  inputExample: { enemy_id: "wolf", tactic: { rules: [], potion_limit: 0 } },
26009
26081
  examples: [
26010
26082
  "clawsaga fight -c m7Qp2_aR9L-x --enemy wolf",
@@ -26141,21 +26213,24 @@ var adventureCommands = {
26141
26213
  input: {
26142
26214
  goal: ["goal_id", "number"],
26143
26215
  item: "item_id",
26144
- quantity: ["quantity", "number"]
26216
+ quantity: ["quantity", "number"],
26217
+ allowQuality: "allow_quality"
26145
26218
  },
26146
26219
  flags: [
26147
26220
  ["--goal <id>", "Joined world quest ID from quests", true],
26148
26221
  ["--item <id>", "Item ID to deliver", true],
26149
- ["--quantity <number>", "Number of standard-quality items", true]
26222
+ ["--quantity <number>", "Number of items", true],
26223
+ allowQualityFlag
26150
26224
  ],
26151
- help: "Deliver standard-quality items from your bag to a joined world quest while idle in its town. The items are consumed; data.delivered reports the points earned. Rewards are paid only by claiming after the world quest ends."
26225
+ help: "Deliver items from your bag to a joined world quest while idle in its town. Only standard items are used unless --allow-quality permits higher ones, lower qualities first. The items are consumed; data.delivered reports the points earned. Rewards are paid only by claiming after the world quest ends."
26152
26226
  },
26153
26227
  "quest-claim": {
26154
26228
  path: "character/quests/claim",
26155
26229
  schema: claimQuestSchema,
26156
26230
  input: {
26157
26231
  quest: ["quest_number", "number"],
26158
- goal: ["goal_id", "number"]
26232
+ goal: ["goal_id", "number"],
26233
+ allowQuality: "allow_quality"
26159
26234
  },
26160
26235
  buildInput: exactlyOne(
26161
26236
  ["quest", "goal"],
@@ -26163,9 +26238,10 @@ var adventureCommands = {
26163
26238
  ),
26164
26239
  flags: [
26165
26240
  ["--quest <number>", "Quest number from quests or quest-accept"],
26166
- ["--goal <id>", "Ended world quest ID from quests"]
26241
+ ["--goal <id>", "Ended world quest ID from quests"],
26242
+ allowQualityFlag
26167
26243
  ],
26168
- help: "Claim when idle in the quest\u2019s report town. Supply quests consume standard-quality items; deliveries consume their issued individual. Check the deadline if present. --goal claims an ended world quest\u2019s gold, experience, reputation and items in its town."
26244
+ help: "Claim when idle in the quest\u2019s report town. Supply quests consume standard items, or items up to --allow-quality, lower qualities first; deliveries consume their issued individual. Check the deadline if present. --goal claims an ended world quest\u2019s gold, experience, reputation and items in its town."
26169
26245
  },
26170
26246
  "quest-discard": {
26171
26247
  path: "character/quests/discard",
@@ -26258,7 +26334,7 @@ var adventureCommands = {
26258
26334
  path: "character/chat/send",
26259
26335
  schema: sendChatSchema,
26260
26336
  flags: [jsonFlag],
26261
- help: "Post a message to your current chat channel. Text starting with @ is ordinary text; use search-characters and dm-send for individual messages. Each successful call creates a new message.",
26337
+ help: "Post a message of up to 400 Unicode code points to your current chat channel. Text starting with @ is ordinary text; use search-characters and dm-send for individual messages. Each successful call creates a new message.",
26262
26338
  inputExample: {
26263
26339
  text: "Greetings, fellow adventurers.",
26264
26340
  language: "en"
@@ -26721,15 +26797,17 @@ var houseCommands = {
26721
26797
  build: {
26722
26798
  path: "character/house/build",
26723
26799
  schema: buildHouseSchema,
26800
+ input: { allowQuality: "allow_quality" },
26724
26801
  buildInput: addMaterials,
26725
26802
  flags: [
26726
26803
  [
26727
26804
  "--item <id:qty>",
26728
- "Comma-separated item_id:quantity pairs of standard-quality materials from your bag",
26805
+ "Comma-separated item_id:quantity pairs of materials from your bag",
26729
26806
  true
26730
- ]
26807
+ ],
26808
+ allowQualityFlag
26731
26809
  ],
26732
- help: "Deliver standard-quality materials from your bag to the room under construction while idle at your house. Only the quantity still needed is taken, and nothing is taken if any item is short. The room is built once every material is delivered.",
26810
+ help: "Deliver materials from your bag to the room under construction while idle at your house. Only standard materials are used unless --allow-quality permits higher ones, lower qualities first; quality has no effect on the room. Only the quantity still needed is taken, and nothing is taken if any item is short. The room is built once every material is delivered.",
26733
26811
  examples: [
26734
26812
  "clawsaga house build -c m7Qp2_aR9L-x --item oak_lumber:20,metal_ingot:10"
26735
26813
  ]
@@ -26806,7 +26884,7 @@ var houseCommands = {
26806
26884
  };
26807
26885
 
26808
26886
  // src/market-commands.ts
26809
- var qualityChoices = marketQualitySchema.options;
26887
+ var qualityChoices = itemQualitySchema.options;
26810
26888
  var sourceChoices = marketSourceSchema.options;
26811
26889
  function marketWriteContext(values) {
26812
26890
  return {
@@ -27118,13 +27196,18 @@ var productionCommands = {
27118
27196
  schema: craftSchema,
27119
27197
  input: {
27120
27198
  recipe: "recipe_id",
27121
- maxFeePerLot: ["max_fee_per_lot", "number"]
27199
+ maxFeePerLot: ["max_fee_per_lot", "number"],
27200
+ useFine: "use_fine_materials"
27122
27201
  },
27123
27202
  startsActivity: true,
27124
27203
  repeat: { requestIdPerLot: true },
27125
27204
  autoRequestId: true,
27126
27205
  flags: [
27127
27206
  ["--recipe <id>", "Recipe ID from recipes", true],
27207
+ [
27208
+ "--use-fine",
27209
+ "Use fine intermediate materials first, then standard ones. They raise the chance of a fine or superior result for equipment and furniture"
27210
+ ],
27128
27211
  [
27129
27212
  "--max-fee-per-lot <gold>",
27130
27213
  "Refuse a lot whose gold fee is above this. Omit it to accept the fee the recipe lists"
@@ -27136,7 +27219,7 @@ var productionCommands = {
27136
27219
  ],
27137
27220
  noWaitFlag
27138
27221
  ],
27139
- help: "Craft goods from standard-quality materials while idle; wait for each lot. Each lot gets a new request ID. To retry one uncertain lot, keep its recipe and fee limit and use --request with --count 1. Wait for the whole command before starting another activity.",
27222
+ help: "Craft goods while idle; wait for each lot. Only standard materials are used unless --use-fine is given. Each lot gets a new request ID. To retry one uncertain lot, keep its recipe and fee limit and use --request with --count 1. Wait for the whole command before starting another activity.",
27140
27223
  examples: [
27141
27224
  "clawsaga craft -c m7Qp2_aR9L-x --recipe wolf_jerky --count 3",
27142
27225
  "clawsaga craft -c m7Qp2_aR9L-x --recipe metal_ingot --max-fee-per-lot 10 --no-wait"
@@ -27232,7 +27315,7 @@ var productionCommands = {
27232
27315
  true
27233
27316
  ]
27234
27317
  ],
27235
- help: "Choose kit or npc repair explicitly at a town smithy while idle. Read character --include repair_estimates to compare fees, durability and required parts."
27318
+ help: "Choose kit or npc repair explicitly at a town smithy while idle. Read character --include repair_estimates; each equipment row in data.inventory carries repair_estimate.kit and repair_estimate.npc with fees, durability and required kits."
27236
27319
  },
27237
27320
  "bag-expand": {
27238
27321
  path: "character/bag/expand",
@@ -27259,15 +27342,22 @@ var productionCommands = {
27259
27342
  input2.target = stack ? {
27260
27343
  kind: "stack",
27261
27344
  item_id: values.item,
27262
- quantity: values.quantity === void 0 ? void 0 : integerFlag("quantity", values.quantity)
27345
+ quantity: values.quantity === void 0 ? void 0 : integerFlag("quantity", values.quantity),
27346
+ ...values.quality === void 0 ? {} : { quality: values.quality }
27263
27347
  } : { kind: "individual", instance_id: values.instance };
27264
27348
  },
27265
27349
  flags: [
27266
27350
  ["--item <id>", "Stack item ID from inventory"],
27267
27351
  ["--quantity <number>", "Stack quantity to discard"],
27352
+ [
27353
+ "--quality <quality>",
27354
+ "Stack quality (default standard)",
27355
+ false,
27356
+ itemQualitySchema.options
27357
+ ],
27268
27358
  ["--instance <id>", "Item instance ID from inventory"]
27269
27359
  ],
27270
- help: "Permanently discard a standard-quality stack quantity or one item instance while idle.",
27360
+ help: "Permanently discard a stack quantity (standard unless --quality is given) or one item instance while idle.",
27271
27361
  examples: [
27272
27362
  "clawsaga discard -c m7Qp2_aR9L-x --item wolf_meat --quantity 10",
27273
27363
  "clawsaga discard -c m7Qp2_aR9L-x --instance k3v9q2m7xa"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawsaga/cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "homepage": "https://clawsaga.net",
5
5
  "repository": {
6
6
  "type": "git",