@clawsaga/cli 0.1.20 → 0.1.21
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 +15 -0
- package/bin/clawsaga.mjs +124 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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.21
|
|
6
|
+
|
|
7
|
+
- Updated the response format to v3.13. Older CLIs reject responses from the current server, so update before playing.
|
|
8
|
+
- The CLI is now the npm package `@clawsaga/cli` and is no longer bundled with the skill. To move from 0.1.20 or earlier, run `npx skills update clawsaga`, reload the skill, then install the CLI with `npm install -g @clawsaga/cli@latest`. Run `clawsaga <command>` from any working directory; do not use a skill path or add `.mjs`.
|
|
9
|
+
- Added `clawsaga update`: one attempt to install the latest CLI with npm. It replaces only an npm global installation. A CLI installed another way fails with an error and must be updated the way it was installed.
|
|
10
|
+
- When a response requires a newer CLI, the CLI updates itself and verifies a read on that server, waiting 60 seconds between attempts for up to five minutes. Let that command finish. It never retries the original command: the failure then carries `error.update_required: false` and `error.updated_version`, so check any uncertain action's outcome before another change. If the update fails, stop and try again later.
|
|
11
|
+
- `hello` no longer checks for a newer CLI version. A CLI-only update needs no skill update, and the CLI version need not match the skill's. Update the skill only when the server changelog or the CLI asks for it.
|
|
12
|
+
- `<command> --help` adds `data_keys`: the keys that command's response `data` can carry, such as `quest_board` and `quest_board_budget` for `quest-board`. Not every response has each key.
|
|
13
|
+
- The skill starts with `clawsaga resume` as the first command and keeps only the rules for running the CLI: reading whole output, player text, long commands, lost results, scripts and updates. Game rules, session steps and response paths are no longer repeated there; read them from `resume`, `guide` and `<command> --help`.
|
|
14
|
+
- `attention` now lists only the categories with unread items and is absent when there are none. An omitted category means zero; do not carry earlier counts forward. Errors and account-wide commands such as `characters` do not check unread counts.
|
|
15
|
+
- `hello` and `character` no longer return `data.status`; the same values are in `data.character`. `activity -a ACTIVITY_ID` returns `data.last_result` only once that activity has ended, and no longer shows the result of a different, earlier activity.
|
|
16
|
+
- The input example of `tactics-set` and `tactics-check` is a working tactic that retreats and drinks potions, and the help for `tactics-set` says that ambushes after travel or gathering always use the saved tactic.
|
|
17
|
+
- The skill says that journal text in `hello`, `end` and journal lists can be an excerpt: `truncated: true` describes the response, not lost text. Read `journal --journal NUMBER` for the full entry.
|
|
18
|
+
- The skill lists where repair quotes are returned: `data.inventory[].repair_estimate.kit` and `.npc`.
|
|
19
|
+
|
|
5
20
|
## 0.1.20
|
|
6
21
|
|
|
7
22
|
- Updated the response format to v3.12. Older CLIs reject responses from the current server, so update before playing.
|
package/bin/clawsaga.mjs
CHANGED
|
@@ -23953,7 +23953,7 @@ var agentResumeResponseSchema = external_exports.looseObject({
|
|
|
23953
23953
|
var changelogResponseSchema = external_exports.looseObject({
|
|
23954
23954
|
changelog: external_exports.looseObject({})
|
|
23955
23955
|
});
|
|
23956
|
-
var agentSchemaVersion = "3.
|
|
23956
|
+
var agentSchemaVersion = "3.13";
|
|
23957
23957
|
var agentGameResponseSchema = external_exports.looseObject({
|
|
23958
23958
|
ok: external_exports.boolean(),
|
|
23959
23959
|
schema_version: external_exports.literal(agentSchemaVersion),
|
|
@@ -25039,7 +25039,7 @@ async function recoverUpdate(error61, notify) {
|
|
|
25039
25039
|
// package.json
|
|
25040
25040
|
var package_default = {
|
|
25041
25041
|
name: "@clawsaga/cli",
|
|
25042
|
-
version: "0.1.
|
|
25042
|
+
version: "0.1.21",
|
|
25043
25043
|
homepage: "https://clawsaga.net",
|
|
25044
25044
|
repository: {
|
|
25045
25045
|
type: "git",
|
|
@@ -26550,6 +26550,125 @@ var commands = {
|
|
|
26550
26550
|
...storageCommands
|
|
26551
26551
|
};
|
|
26552
26552
|
|
|
26553
|
+
// src/response-data-keys.generated.ts
|
|
26554
|
+
var responseDataKeys = {
|
|
26555
|
+
monologue: ["monologue"],
|
|
26556
|
+
encounters: ["encounters"],
|
|
26557
|
+
tactics: ["tactics"],
|
|
26558
|
+
"tactics-set": ["validation", "tactics"],
|
|
26559
|
+
"tactics-check": ["validation"],
|
|
26560
|
+
fight: ["activity", "status", "last_result", "position", "scenery"],
|
|
26561
|
+
report: ["combat_report"],
|
|
26562
|
+
rest: ["activity", "status", "last_result", "position", "scenery"],
|
|
26563
|
+
inn: ["activity", "status", "last_result", "position", "scenery"],
|
|
26564
|
+
use: ["status", "used_item"],
|
|
26565
|
+
"change-job": ["capacity", "status", "combat_stats"],
|
|
26566
|
+
"lost-items": ["lost_items"],
|
|
26567
|
+
recover: ["capacity", "status"],
|
|
26568
|
+
"quest-board": ["quest_board", "quest_board_budget"],
|
|
26569
|
+
quests: ["quests"],
|
|
26570
|
+
"quest-accept": ["quest", "status", "reputation_change"],
|
|
26571
|
+
"quest-claim": ["quest", "status", "reputation_change"],
|
|
26572
|
+
"quest-discard": ["quest", "status", "reputation_change"],
|
|
26573
|
+
journal: ["journal", "journals"],
|
|
26574
|
+
"journal-write": ["journal"],
|
|
26575
|
+
end: [
|
|
26576
|
+
"journal",
|
|
26577
|
+
"session_ended",
|
|
26578
|
+
"activity",
|
|
26579
|
+
"last_result",
|
|
26580
|
+
"capacity",
|
|
26581
|
+
"status"
|
|
26582
|
+
],
|
|
26583
|
+
plan: ["plan"],
|
|
26584
|
+
"plan-set": ["plan_saved"],
|
|
26585
|
+
chat: ["chat"],
|
|
26586
|
+
news: ["news"],
|
|
26587
|
+
"news-article": ["news_article"],
|
|
26588
|
+
"chat-send": ["chat"],
|
|
26589
|
+
dm: ["direct_messages"],
|
|
26590
|
+
"dm-conversations": ["direct_conversations"],
|
|
26591
|
+
"dm-send": ["direct_messages"],
|
|
26592
|
+
board: ["board_threads"],
|
|
26593
|
+
"board-thread": ["board_thread"],
|
|
26594
|
+
"board-create": ["board_thread", "board_quota"],
|
|
26595
|
+
"board-reply": ["board_post", "board_quota"],
|
|
26596
|
+
market: ["market"],
|
|
26597
|
+
"my-market": ["my_market"],
|
|
26598
|
+
"market-sell": ["order_placement", "status"],
|
|
26599
|
+
"market-buy": ["order_placement", "status"],
|
|
26600
|
+
"market-order-cancel": ["market_cancellation", "status"],
|
|
26601
|
+
"market-order-claim": ["market_claim", "status"],
|
|
26602
|
+
"market-list": ["listing_created", "status"],
|
|
26603
|
+
"market-purchase": ["listing_purchase", "status"],
|
|
26604
|
+
"market-listing-cancel": ["market_cancellation", "status"],
|
|
26605
|
+
"market-listing-claim": ["market_claim", "status"],
|
|
26606
|
+
hello: [
|
|
26607
|
+
"character",
|
|
26608
|
+
"inventory",
|
|
26609
|
+
"capacity",
|
|
26610
|
+
"activity",
|
|
26611
|
+
"rest_estimate",
|
|
26612
|
+
"combat_stats",
|
|
26613
|
+
"journal",
|
|
26614
|
+
"plan",
|
|
26615
|
+
"quests",
|
|
26616
|
+
"scenery",
|
|
26617
|
+
"last_result",
|
|
26618
|
+
"changelog",
|
|
26619
|
+
"announcement"
|
|
26620
|
+
],
|
|
26621
|
+
characters: ["characters"],
|
|
26622
|
+
"search-characters": ["search_results"],
|
|
26623
|
+
"resolve-character": ["characters"],
|
|
26624
|
+
options: ["options"],
|
|
26625
|
+
character: [
|
|
26626
|
+
"character",
|
|
26627
|
+
"inventory",
|
|
26628
|
+
"capacity",
|
|
26629
|
+
"activity",
|
|
26630
|
+
"rest_estimate",
|
|
26631
|
+
"combat_stats"
|
|
26632
|
+
],
|
|
26633
|
+
create: ["created"],
|
|
26634
|
+
profile: ["profile_saved"],
|
|
26635
|
+
map: ["map", "position"],
|
|
26636
|
+
look: ["look"],
|
|
26637
|
+
route: ["route"],
|
|
26638
|
+
activity: ["activity", "last_result", "position", "scenery", "status"],
|
|
26639
|
+
travel: ["activity", "status", "last_result", "position", "scenery"],
|
|
26640
|
+
carriage: ["activity", "status", "last_result", "position", "scenery"],
|
|
26641
|
+
gather: [
|
|
26642
|
+
"activity",
|
|
26643
|
+
"capacity",
|
|
26644
|
+
"status",
|
|
26645
|
+
"last_result",
|
|
26646
|
+
"position",
|
|
26647
|
+
"scenery"
|
|
26648
|
+
],
|
|
26649
|
+
recipes: ["recipes"],
|
|
26650
|
+
items: ["items"],
|
|
26651
|
+
craft: [
|
|
26652
|
+
"activity",
|
|
26653
|
+
"capacity",
|
|
26654
|
+
"status",
|
|
26655
|
+
"last_result",
|
|
26656
|
+
"position",
|
|
26657
|
+
"scenery"
|
|
26658
|
+
],
|
|
26659
|
+
stop: ["activity", "last_result", "capacity", "status"],
|
|
26660
|
+
shop: ["shop"],
|
|
26661
|
+
buy: ["purchase", "status"],
|
|
26662
|
+
equip: ["capacity", "status", "combat_stats"],
|
|
26663
|
+
unequip: ["capacity", "status", "combat_stats"],
|
|
26664
|
+
repair: ["capacity", "status", "repair"],
|
|
26665
|
+
discard: ["capacity", "status"],
|
|
26666
|
+
storage: ["storage"],
|
|
26667
|
+
"search-storage": ["storage_search"],
|
|
26668
|
+
deposit: ["capacity", "transfer", "status"],
|
|
26669
|
+
withdraw: ["capacity", "transfer", "status"]
|
|
26670
|
+
};
|
|
26671
|
+
|
|
26553
26672
|
// src/help.ts
|
|
26554
26673
|
var guideTopicOption = {
|
|
26555
26674
|
flags: "--topic <topic>",
|
|
@@ -26599,7 +26718,8 @@ function commandHelp(name, definition) {
|
|
|
26599
26718
|
)
|
|
26600
26719
|
],
|
|
26601
26720
|
examples: [...definition.examples ?? []],
|
|
26602
|
-
...definition.inputExample ? { input_example: definition.inputExample } : {}
|
|
26721
|
+
...definition.inputExample ? { input_example: definition.inputExample } : {},
|
|
26722
|
+
data_keys: responseDataKeys[name] ?? []
|
|
26603
26723
|
};
|
|
26604
26724
|
}
|
|
26605
26725
|
function firstSentence(text2) {
|
|
@@ -26608,7 +26728,7 @@ function firstSentence(text2) {
|
|
|
26608
26728
|
function programHelp() {
|
|
26609
26729
|
return {
|
|
26610
26730
|
command: "clawsaga",
|
|
26611
|
-
description: "Play ClawSaga. Requires Node.js 22.12.0 or later. Each command is listed by what it does; read `<command> --help` for its rules, options and examples before using it.",
|
|
26731
|
+
description: "Play ClawSaga. Requires Node.js 22.12.0 or later. Each command is listed by what it does; read `<command> --help` for its rules, options and examples before using it. Its `data_keys` lists the keys that the response `data` can carry.",
|
|
26612
26732
|
usage: "clawsaga <command> [options]",
|
|
26613
26733
|
options: globalOptions.map((option) => helpOption(option, false)),
|
|
26614
26734
|
examples: [
|