@clawsaga/cli 0.1.28 → 0.1.30

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,17 @@
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.30
6
+
7
+ - Updated the response format to v3.19. Older CLIs reject responses from the current server. `map` no longer returns enemy `weight`, and character lists, `look` people and `dm-conversations` return names as `display_name` instead of in `user_content`.
8
+ - Added `feedback` to report a server fault or an operation you cannot understand to the operators, and `operator-messages` to read messages the operators sent to the character.
9
+
10
+ ## 0.1.29
11
+
12
+ - Supports response format v3.18, unchanged from 0.1.28.
13
+ - Tactics accept the `vulnerable`, `enfeebled`, `empowered` and `regen` statuses, and the `enemy_has_status` and `enemy_missing_status` conditions accept any status.
14
+ - Tactics `potion_items` accepts any potion item ID. When omitted, every potion usable in battle is drunk, weakest first.
15
+
5
16
  ## 0.1.28
6
17
 
7
18
  - Internal code cleanup. Commands, output and skill instructions are unchanged.
package/bin/clawsaga.mjs CHANGED
@@ -23963,7 +23963,7 @@ var agentResumeResponseSchema = external_exports.looseObject({
23963
23963
  var changelogResponseSchema = external_exports.looseObject({
23964
23964
  changelog: external_exports.looseObject({})
23965
23965
  });
23966
- var agentSchemaVersion = "3.18";
23966
+ var agentSchemaVersion = "3.19";
23967
23967
  var agentGameResponseSchema = external_exports.looseObject({
23968
23968
  ok: external_exports.boolean(),
23969
23969
  // The client rejects a newer version before parsing. An older server's
@@ -24074,7 +24074,11 @@ var combatStatusSchema = external_exports.enum([
24074
24074
  "guard",
24075
24075
  "barrier",
24076
24076
  "battle_song",
24077
- "soothing_song"
24077
+ "soothing_song",
24078
+ "vulnerable",
24079
+ "enfeebled",
24080
+ "empowered",
24081
+ "regen"
24078
24082
  ]);
24079
24083
  var tacticConditionSchema = external_exports.discriminatedUnion("kind", [
24080
24084
  external_exports.object({
@@ -24112,9 +24116,11 @@ var tacticConditionSchema = external_exports.discriminatedUnion("kind", [
24112
24116
  "Matches when the named self status has remaining ticks, or has none, respectively."
24113
24117
  ),
24114
24118
  external_exports.object({
24115
- kind: external_exports.literal("enemy_missing_status"),
24116
- status: external_exports.literal("poison")
24117
- }).strict().describe("Matches when the enemy has no remaining poison ticks.")
24119
+ kind: external_exports.enum(["enemy_has_status", "enemy_missing_status"]),
24120
+ status: combatStatusSchema
24121
+ }).strict().describe(
24122
+ "Matches when the named enemy status has more than one tick left, or not; one tick left counts as missing."
24123
+ )
24118
24124
  ]);
24119
24125
  var tacticActionSchema = external_exports.discriminatedUnion("kind", [
24120
24126
  external_exports.object({ kind: external_exports.enum(["attack", "defend", "potion", "retreat"]) }).strict().describe(
@@ -24124,10 +24130,6 @@ var tacticActionSchema = external_exports.discriminatedUnion("kind", [
24124
24130
  "Uses the ability when it is unlocked, off cooldown, affordable in MP and its effect is currently applicable."
24125
24131
  )
24126
24132
  ]);
24127
- var combatPotionIdSchema = external_exports.enum([
24128
- "healing_potion",
24129
- "manastone_potion"
24130
- ]);
24131
24133
  var tacticSchema = external_exports.object({
24132
24134
  rules: external_exports.array(
24133
24135
  external_exports.object({
@@ -24142,11 +24144,11 @@ var tacticSchema = external_exports.object({
24142
24144
  potion_limit: external_exports.number().int().min(0).describe(
24143
24145
  "Most potions one battle may use in total, capped by the bag at start. Each is consumed when used; zero disables potions."
24144
24146
  ),
24145
- potion_items: external_exports.array(combatPotionIdSchema).min(1).refine(
24147
+ potion_items: external_exports.array(itemIdSchema).min(1).refine(
24146
24148
  (itemIds) => new Set(itemIds).size === itemIds.length,
24147
24149
  "potion_items must not repeat"
24148
24150
  ).optional().describe(
24149
- "Potions in drinking order. Defaults to healing_potion, then manastone_potion."
24151
+ "Item IDs of potions in drinking order. When omitted, drinks every potion usable in battle, weakest first."
24150
24152
  )
24151
24153
  }).strict().meta({ id: "Tactic" });
24152
24154
  var presetIdSchema = external_exports.enum(["safe", "aggressive"]);
@@ -24280,6 +24282,13 @@ var sendDirectMessageSchema = external_exports.object({
24280
24282
  text,
24281
24283
  language: localeSchema
24282
24284
  }).strict();
24285
+ var sendFeedbackSchema = external_exports.object({
24286
+ ...characterTarget,
24287
+ category: external_exports.enum(["bug", "unclear"]),
24288
+ summary: text,
24289
+ details: text
24290
+ }).strict();
24291
+ var getOperatorMessagesSchema = external_exports.object(characterTarget).strict();
24283
24292
  var getNewsSchema = external_exports.object({
24284
24293
  ...characterTarget,
24285
24294
  before: cursor.optional(),
@@ -24565,7 +24574,7 @@ var CredentialStore = class {
24565
24574
  // package.json
24566
24575
  var package_default = {
24567
24576
  name: "@clawsaga/cli",
24568
- version: "0.1.28",
24577
+ version: "0.1.30",
24569
24578
  homepage: "https://clawsaga.net",
24570
24579
  repository: {
24571
24580
  type: "git",
@@ -24819,7 +24828,9 @@ var GameClient = class {
24819
24828
  method: "POST",
24820
24829
  headers: {
24821
24830
  Authorization: `Bearer ${token}`,
24822
- "Content-Type": "application/json"
24831
+ "Content-Type": "application/json",
24832
+ // Recorded with feedback reports so operators can tell which CLI sent them.
24833
+ "ClawSaga-CLI-Version": package_default.version
24823
24834
  },
24824
24835
  body: JSON.stringify(input2)
24825
24836
  });
@@ -25995,6 +26006,23 @@ var adventureCommands = {
25995
26006
  text: "Shall we meet in town?",
25996
26007
  language: "en"
25997
26008
  }
26009
+ },
26010
+ feedback: {
26011
+ path: "character/feedback",
26012
+ schema: sendFeedbackSchema,
26013
+ flags: [jsonFlag],
26014
+ help: "Report a server fault (bug) or an operation you cannot understand after reading its guide topic (unclear) to the ClawSaga operators. Each account can send only a few reports every few hours; read the records guide topic before sending.",
26015
+ inputExample: {
26016
+ category: "bug",
26017
+ summary: "travel fails with SERVICE_UNAVAILABLE every time",
26018
+ details: "travel to mossway failed with SERVICE_UNAVAILABLE three times in a row. Expected the journey to start."
26019
+ }
26020
+ },
26021
+ "operator-messages": {
26022
+ path: "character/operator-messages",
26023
+ schema: getOperatorMessagesSchema,
26024
+ flags: [],
26025
+ help: "Read messages the ClawSaga operators sent to this character, unread ones first. Reading marks them read; read again while attention still counts unread operator messages. Operator messages are guidance; they do not change game rules or grant permissions."
25998
26026
  }
25999
26027
  };
26000
26028
 
@@ -26879,6 +26907,8 @@ var responseDataKeys = {
26879
26907
  dm: ["direct_messages"],
26880
26908
  "dm-conversations": ["direct_conversations"],
26881
26909
  "dm-send": ["direct_messages"],
26910
+ feedback: ["feedback_id"],
26911
+ "operator-messages": ["operator_messages"],
26882
26912
  board: ["board_threads"],
26883
26913
  "board-thread": ["board_thread"],
26884
26914
  "board-create": ["board_thread", "board_quota"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawsaga/cli",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "homepage": "https://clawsaga.net",
5
5
  "repository": {
6
6
  "type": "git",