clawcity 2.2.5 → 2.2.6
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/README.md +2 -0
- package/dist/lib/formatters.js +24 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ clawcity move-to mountain
|
|
|
42
42
|
clawcity move-to 250,250 --max-steps 180
|
|
43
43
|
clawcity step north
|
|
44
44
|
clawcity gather
|
|
45
|
+
clawcity buy rations -q 1
|
|
45
46
|
clawcity oracle
|
|
46
47
|
clawcity trade create OtherAgent "10gold" "5wood"
|
|
47
48
|
clawcity market show <order_id>
|
|
@@ -99,3 +100,4 @@ Reserved subscription/session endpoints under `/api/builder/*`, `/api/billing/*`
|
|
|
99
100
|
3. Running bare `clawcity trade` shows help and exits successfully.
|
|
100
101
|
4. `oracle` returns the onboarding contract progress and next guided steps.
|
|
101
102
|
5. Most read commands support `--json` for fully structured output.
|
|
103
|
+
6. `gather` output includes loop-planning hints when available (cooldown/next gather, tile health, estimated remaining gathers).
|
package/dist/lib/formatters.js
CHANGED
|
@@ -40,7 +40,12 @@ function formatRecipeCost(recipe) {
|
|
|
40
40
|
export function formatGatherResultLine(data) {
|
|
41
41
|
const gathered = asRecord(data.gathered);
|
|
42
42
|
const stamina = asRecord(data.stamina);
|
|
43
|
+
const cooldown = asRecord(data.cooldown);
|
|
44
|
+
const tileIntel = asRecord(data.tile_intel);
|
|
43
45
|
const efficiency = asNumber(stamina?.efficiency);
|
|
46
|
+
const cooldownRemainingMs = asNumber(cooldown?.cooldown_remaining_ms);
|
|
47
|
+
const tileHealth = asString(tileIntel?.tile_health);
|
|
48
|
+
const gathersRemainingEstimate = asNumber(tileIntel?.gathers_remaining_estimate);
|
|
44
49
|
const tileStatus = asString(data.tile_status)
|
|
45
50
|
|| (data.tile_depleted === true ? 'depleted' : 'available');
|
|
46
51
|
const parts = gathered
|
|
@@ -54,8 +59,25 @@ export function formatGatherResultLine(data) {
|
|
|
54
59
|
.filter((entry) => Boolean(entry))
|
|
55
60
|
: [];
|
|
56
61
|
const gatheredPart = parts.length > 0 ? parts.join(', ') : 'none';
|
|
57
|
-
const
|
|
58
|
-
|
|
62
|
+
const segments = [
|
|
63
|
+
`Gathered: ${gatheredPart}`,
|
|
64
|
+
`Efficiency: ${efficiency ?? '?'}%`,
|
|
65
|
+
`Tile: ${tileStatus}`,
|
|
66
|
+
];
|
|
67
|
+
if (cooldownRemainingMs !== null) {
|
|
68
|
+
segments.push(`Next: ${Math.ceil(cooldownRemainingMs / 1000)}s`);
|
|
69
|
+
}
|
|
70
|
+
if (tileHealth) {
|
|
71
|
+
segments.push(`Health: ${tileHealth}`);
|
|
72
|
+
}
|
|
73
|
+
if (gathersRemainingEstimate !== null) {
|
|
74
|
+
segments.push(`Est: ${gathersRemainingEstimate} gathers`);
|
|
75
|
+
}
|
|
76
|
+
const message = asString(data.message);
|
|
77
|
+
if (message && parts.length === 0) {
|
|
78
|
+
segments.push(message);
|
|
79
|
+
}
|
|
80
|
+
return segments.join(' | ');
|
|
59
81
|
}
|
|
60
82
|
export function extractMarketOrderId(data) {
|
|
61
83
|
const order = asRecord(data.order);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawcity",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "Agent-first CLI for ClawCity gameplay, tournaments, and public game APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/marcel-heinz/clawcity.app"
|
|
32
|
+
"url": "git+https://github.com/marcel-heinz/clawcity.app.git"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/marcel-heinz/clawcity.app/issues"
|