@blackasteroid/riu 0.2.0 → 0.3.0
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 +30 -3
- package/dist/agent-guide/manual.js +456 -0
- package/dist/agent-guide/manual.js.map +1 -0
- package/dist/cli.js +39 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent-guide.js +82 -0
- package/dist/commands/agent-guide.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,16 +16,30 @@ Doing this by hand is tedious. There's a Windows-only Unity tool called *Rust Cu
|
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @blackasteroid/riu
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
That's it — `riu` is now on your PATH. Requires **Node.js 20+**.
|
|
24
|
+
|
|
25
|
+
To upgrade later:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
riu upgrade
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`riu` checks npm for a newer version once a day in the background and prints a one-line notice to stderr when one is available (skipped automatically in `--json` mode so agents don't see noise). You can also run `riu upgrade --check` to query manually.
|
|
32
|
+
|
|
33
|
+
### From source (development)
|
|
34
|
+
|
|
19
35
|
```bash
|
|
20
36
|
git clone git@github.com:BlackAsteroid/rust-icon-uploader.git
|
|
21
37
|
cd rust-icon-uploader
|
|
22
38
|
npm install
|
|
23
39
|
npm run build
|
|
24
|
-
npm link # makes the `riu` command available globally
|
|
40
|
+
npm link # makes the `riu` command available globally from this checkout
|
|
25
41
|
```
|
|
26
42
|
|
|
27
|
-
Requires **Node.js 20+**.
|
|
28
|
-
|
|
29
43
|
---
|
|
30
44
|
|
|
31
45
|
## Prerequisites for real uploads
|
|
@@ -111,6 +125,19 @@ riu install-sdk --force # reinstall over existing
|
|
|
111
125
|
|
|
112
126
|
This command is run automatically by `riu init` if no `steamSdkPath` is provided. Useful as a standalone after installing Rust on a new machine.
|
|
113
127
|
|
|
128
|
+
### `riu upgrade`
|
|
129
|
+
|
|
130
|
+
Upgrade riu to the latest published version on npm.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
riu upgrade # full upgrade
|
|
134
|
+
riu upgrade --check # check only, don't install
|
|
135
|
+
riu upgrade --check --json # structured output for scripting
|
|
136
|
+
riu upgrade --dry-run # show the npm install command without running it
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Background update checks run automatically on every command (cached 1 day) and print a stderr notice if a newer version is available. Skipped automatically when `--json` / `--version` / `--help` is used so output stays clean for agents.
|
|
140
|
+
|
|
114
141
|
### `riu doctor`
|
|
115
142
|
|
|
116
143
|
Diagnostic check: verifies config exists, dylib is present, Steam is running, SteamID format is valid, AppID is set. Exits non-zero if any check fails.
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
// Single source of truth for the `riu agent-guide` command. Both the
|
|
2
|
+
// markdown manual and the structured JSON shape live here so they can't
|
|
3
|
+
// drift apart.
|
|
4
|
+
//
|
|
5
|
+
// Add new commands by appending an entry to COMMAND_GUIDE — the markdown
|
|
6
|
+
// renderer walks the same data structure.
|
|
7
|
+
export const PURPOSE = `riu (rust-icon-uploader) automates publishing icon-only Rust workshop skins to the Steam Workshop.
|
|
8
|
+
|
|
9
|
+
Most Rust items aren't on Facepunch's official skinnable list (UAV signal, Patrol Signal, money items, etc.), so you can't make traditional texture skins for them. There's a workaround: you can upload a workshop item with an empty Textures block and Rust will use the workshop preview image as the in-game inventory icon. riu automates that pattern end-to-end — generating the right manifest.txt, validating the icon PNG, copying libsteam_api.dylib from your Rust install, and publishing via the Steam UGC API.
|
|
10
|
+
|
|
11
|
+
Every command has a JSON mode for headless / agent use. The mock client in --dry-run mode lets you exercise the full pipeline without ever contacting Steam.`;
|
|
12
|
+
export const MENTAL_MODEL = `**A "skin" in riu** is a folder containing two files:
|
|
13
|
+
|
|
14
|
+
<skin-dir>/
|
|
15
|
+
├── manifest.txt ← JSON describing the item type and shader values
|
|
16
|
+
└── icon.png ← 256/512/1024/2048px square RGBA, ≤1MB
|
|
17
|
+
|
|
18
|
+
The manifest's Textures dict is intentionally **empty** — that's the trick. With no texture overrides, the workshop item is harmless from a model-skinning perspective, and Rust falls back to the workshop preview (icon.png) as the inventory icon for any item matching the manifest's ItemType (Grenade, Rock, Pistol, etc.).
|
|
19
|
+
|
|
20
|
+
**The pipeline** is: \`riu init\` (one-time, auto-installs libsteam_api.dylib from your local Rust install) → \`riu new\` (generates a skin folder from an icon) → \`riu upload\` (publishes to Steam) → \`riu list\` (read your local cache of uploaded items). For batch work use \`riu upload-all\` against a parent folder of skin folders.`;
|
|
21
|
+
export const PREREQUISITES = `1. **Node.js 20+**
|
|
22
|
+
2. **Steam client running**, logged into the account that owns Rust (AppID 252490)
|
|
23
|
+
3. **libsteam_api.dylib** — auto-installed by \`riu init\` from your local Rust install. You don't need to download anything from Valve.
|
|
24
|
+
4. Your **SteamID64** (17-digit numeric ID starting with 7656). This is the only thing you'll be asked for during init.
|
|
25
|
+
|
|
26
|
+
\`riu doctor\` reports the status of all four prerequisites at any time.`;
|
|
27
|
+
export const WORKFLOWS = [
|
|
28
|
+
{
|
|
29
|
+
name: "publish-one",
|
|
30
|
+
description: "Publish a single icon as a workshop item",
|
|
31
|
+
steps: [
|
|
32
|
+
'riu init --json \'{"authorId":"76561198XXXXXXXXX"}\' --force',
|
|
33
|
+
'riu new --json \'{"itemType":"Grenade","title":"My UAV","iconPath":"/path/to/icon.png","outputDir":"./skins/uav"}\'',
|
|
34
|
+
"riu upload ./skins/uav --dry-run --json # validate without publishing",
|
|
35
|
+
"riu upload ./skins/uav --json # actually publish",
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "bulk-publish",
|
|
40
|
+
description: "Publish many icons in one go",
|
|
41
|
+
steps: [
|
|
42
|
+
"# 1. Generate a skin folder per icon (or hand-build them)",
|
|
43
|
+
'for i in icons/*.png; do',
|
|
44
|
+
' name=$(basename "$i" .png)',
|
|
45
|
+
' riu new --json "{\\"itemType\\":\\"Grenade\\",\\"title\\":\\"$name\\",\\"iconPath\\":\\"$i\\",\\"outputDir\\":\\"./skins/$name\\"}"',
|
|
46
|
+
"done",
|
|
47
|
+
"# 2. Upload all sequentially (dry-run first to verify)",
|
|
48
|
+
"riu upload-all ./skins --dry-run --json",
|
|
49
|
+
"riu upload-all ./skins --json # NDJSON event stream",
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "update-existing",
|
|
54
|
+
description: "Replace the icon on a previously published workshop item",
|
|
55
|
+
steps: [
|
|
56
|
+
'# Look up the publishedFileId from `riu list` or your records',
|
|
57
|
+
'riu update 3248306153 --json # uses cached skinDir if previously uploaded via riu',
|
|
58
|
+
'riu update 3248306153 --skin-dir ./skins/uav --note "v2 colors" --json',
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "ci-headless",
|
|
63
|
+
description: "Run from CI / a non-interactive environment",
|
|
64
|
+
steps: [
|
|
65
|
+
"# All commands accept --json. Steam still needs to be running on the machine.",
|
|
66
|
+
"# Use --dry-run on machines without a real Steam install — it uses a mock client.",
|
|
67
|
+
'riu doctor --json',
|
|
68
|
+
'riu upload-all ./skins --dry-run --json | jq -c \'select(.event=="item")\'',
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
export const COMMAND_GUIDE = [
|
|
73
|
+
{
|
|
74
|
+
name: "init",
|
|
75
|
+
purpose: "One-time setup: writes config to disk, auto-installs libsteam_api.dylib if it can find a local Steam game install",
|
|
76
|
+
when: "First time using riu on a machine, or after deleting your config",
|
|
77
|
+
flags: [
|
|
78
|
+
{ flag: "--show", description: "print current config and exit" },
|
|
79
|
+
{ flag: "--force", description: "overwrite existing config" },
|
|
80
|
+
{ flag: "--dry-run", description: "validate input without writing config" },
|
|
81
|
+
{ flag: "--json [payload]", description: "headless mode — pass config as JSON object" },
|
|
82
|
+
],
|
|
83
|
+
jsonPayload: {
|
|
84
|
+
description: "Config payload. Only authorId is required if Rust is installed locally (steamSdkPath is auto-resolved).",
|
|
85
|
+
schema: {
|
|
86
|
+
steamSdkPath: { type: "string", required: false, description: "absolute path to dir containing libsteam_api.dylib. Auto-resolved when omitted if Rust is installed locally." },
|
|
87
|
+
authorId: { type: "string", required: true, description: "17-digit SteamID64 starting with 7656" },
|
|
88
|
+
steamAppId: { type: "number", required: false, description: "Steam app ID, default 252490 (Rust)" },
|
|
89
|
+
defaultTags: { type: "string[]", required: false, description: "tags applied to every upload, default ['Version3','Skin']" },
|
|
90
|
+
defaultDescription: { type: "string", required: false, description: "default description applied when --description is omitted" },
|
|
91
|
+
cacheDir: { type: "string", required: false, description: "where uploaded skins are recorded, default ~/.riu/cache" },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
examples: [
|
|
95
|
+
{ description: "headless init with auto SDK install", cmd: 'riu init --json \'{"authorId":"76561198000000000"}\' --force' },
|
|
96
|
+
{ description: "show current config as JSON", cmd: "riu init --show --json" },
|
|
97
|
+
{ description: "validate without writing", cmd: 'riu init --json \'{"authorId":"76561198000000000"}\' --dry-run' },
|
|
98
|
+
],
|
|
99
|
+
outputSuccess: {
|
|
100
|
+
status: '"ok"',
|
|
101
|
+
mode: '"saved" | "shown" | "dry-run"',
|
|
102
|
+
config: "Config object",
|
|
103
|
+
configPath: "absolute path to config file",
|
|
104
|
+
validatedSdk: "{ ok, dylibPath?, reason? }",
|
|
105
|
+
sdkAutoInstalled: '{ source: "Rust" | "...", path } when riu auto-installed the dylib',
|
|
106
|
+
},
|
|
107
|
+
outputError: {
|
|
108
|
+
status: '"error"',
|
|
109
|
+
error: '{ message: string, field?: string }',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "doctor",
|
|
114
|
+
purpose: "Diagnose the environment: config exists, dylib present, Steam running, SteamID valid, AppID set",
|
|
115
|
+
when: "Before attempting a real upload, or to debug a failed upload",
|
|
116
|
+
flags: [{ flag: "--json", description: "structured JSON output" }],
|
|
117
|
+
examples: [
|
|
118
|
+
{ description: "human-readable", cmd: "riu doctor" },
|
|
119
|
+
{ description: "JSON for parsing", cmd: "riu doctor --json" },
|
|
120
|
+
],
|
|
121
|
+
outputSuccess: {
|
|
122
|
+
status: '"ok" | "fail"',
|
|
123
|
+
checks: '[{ name, ok: boolean, detail?: string }, ...] — config / steamSdk / steamRunning / authorId / steamAppId',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "install-sdk",
|
|
128
|
+
purpose: "Auto-locate libsteam_api.dylib in a local Steam game install and copy it to ~/.riu/sdk/",
|
|
129
|
+
when: "Run automatically by `riu init`. Re-run manually after installing Rust on a new machine, or to reinstall.",
|
|
130
|
+
flags: [
|
|
131
|
+
{ flag: "--from <path>", description: "install from an explicit source path instead of auto-locating" },
|
|
132
|
+
{ flag: "--force", description: "reinstall even if SDK is already present" },
|
|
133
|
+
{ flag: "--dry-run", description: "show what would be installed without copying" },
|
|
134
|
+
{ flag: "--json", description: "structured JSON output" },
|
|
135
|
+
],
|
|
136
|
+
examples: [
|
|
137
|
+
{ description: "auto-locate and install", cmd: "riu install-sdk --json" },
|
|
138
|
+
{ description: "from a manual path", cmd: "riu install-sdk --from /path/to/libsteam_api.dylib --json" },
|
|
139
|
+
{ description: "dry run", cmd: "riu install-sdk --dry-run --json" },
|
|
140
|
+
],
|
|
141
|
+
outputSuccess: {
|
|
142
|
+
status: '"ok" | "skipped"',
|
|
143
|
+
mode: '"installed" | "dry-run" | "already-present"',
|
|
144
|
+
installedPath: 'string ("~/.riu/sdk/libsteam_api.dylib")',
|
|
145
|
+
source: "game name (e.g. 'Rust') or 'manual (--from)'",
|
|
146
|
+
bytesCopied: "number of bytes",
|
|
147
|
+
candidates: "[{ path, game }, ...] all candidates found",
|
|
148
|
+
configUpdated: "boolean — whether the existing config was updated to point at the managed dir",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "new",
|
|
153
|
+
purpose: "Generate a complete skin folder (manifest.txt + icon.png) from an icon file. Does NOT contact Steam.",
|
|
154
|
+
when: "Whenever you have a new icon you want to turn into a publishable skin folder",
|
|
155
|
+
flags: [
|
|
156
|
+
{ flag: "--dry-run", description: "validate everything without writing files" },
|
|
157
|
+
{ flag: "--json [payload]", description: "headless mode — pass options as JSON object" },
|
|
158
|
+
],
|
|
159
|
+
jsonPayload: {
|
|
160
|
+
description: "Skin generation parameters",
|
|
161
|
+
schema: {
|
|
162
|
+
itemType: { type: "string", required: true, description: "Rust item category (Grenade for UAV/Patrol Signal, Rock, Pistol, Rifle, Shotgun, SMG, Bow, Sword, Spear, Knife, Axe, Hammer, Tool, Hat, Shirt, Pants, Boots, Gloves, Container, SleepingBag, Furniture)" },
|
|
163
|
+
title: { type: "string", required: true, description: "workshop item title, ≤128 chars" },
|
|
164
|
+
description: { type: "string", required: false, description: "workshop item description (defaults to config.defaultDescription)" },
|
|
165
|
+
tags: { type: "string[]", required: false, description: "workshop tags (defaults to config.defaultTags)" },
|
|
166
|
+
iconPath: { type: "string", required: true, description: "path to source icon PNG (must be square, 256/512/1024/2048px, RGBA preferred, ≤1MB)" },
|
|
167
|
+
outputDir: { type: "string", required: false, description: "where to write the skin folder (defaults to ./skins/<slugified-title>)" },
|
|
168
|
+
allowCustomItemType: { type: "boolean", required: false, description: "allow itemType outside the known catalog (default false)" },
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
examples: [
|
|
172
|
+
{ description: "generate UAV skin folder", cmd: 'riu new --json \'{"itemType":"Grenade","title":"My UAV","iconPath":"./uav.png","outputDir":"./skins/uav"}\'' },
|
|
173
|
+
{ description: "validate without writing", cmd: 'riu new --json \'{"itemType":"Grenade","title":"My UAV","iconPath":"./uav.png","outputDir":"./skins/uav"}\' --dry-run' },
|
|
174
|
+
],
|
|
175
|
+
outputSuccess: {
|
|
176
|
+
status: '"ok"',
|
|
177
|
+
mode: '"written" | "dry-run"',
|
|
178
|
+
skinDir: "absolute path to the generated folder",
|
|
179
|
+
manifestPath: "absolute path to manifest.txt",
|
|
180
|
+
iconPath: "absolute path to copied icon.png",
|
|
181
|
+
manifest: "the full RustManifest object that was written",
|
|
182
|
+
warnings: "string[] — non-fatal issues (unknown itemType, missing alpha, etc.)",
|
|
183
|
+
iconMeta: "{ width, height, format, hasAlpha, fileSize }",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "upload",
|
|
188
|
+
purpose: "Publish a single skin folder to the Steam Workshop. Persists the result in the local cache.",
|
|
189
|
+
when: "After `riu new` to publish the generated folder",
|
|
190
|
+
positional: [
|
|
191
|
+
{ name: "skin-dir", required: false, description: "path to skin folder. May also be passed in --json payload as skinDir." },
|
|
192
|
+
],
|
|
193
|
+
flags: [
|
|
194
|
+
{ flag: "--title <title>", description: "override the workshop item title" },
|
|
195
|
+
{ flag: "--description <desc>", description: "override the description" },
|
|
196
|
+
{ flag: "--tags <csv>", description: "comma-separated tags override" },
|
|
197
|
+
{ flag: "--dry-run", description: "use mock Steam client (no contact with Steam)" },
|
|
198
|
+
{ flag: "--json [payload]", description: "headless mode" },
|
|
199
|
+
],
|
|
200
|
+
jsonPayload: {
|
|
201
|
+
description: "Upload parameters (CLI flags take priority over JSON fields with the same name)",
|
|
202
|
+
schema: {
|
|
203
|
+
skinDir: { type: "string", required: true, description: "path to skin folder (or pass as positional arg)" },
|
|
204
|
+
title: { type: "string", required: false, description: "title override" },
|
|
205
|
+
description: { type: "string", required: false, description: "description override" },
|
|
206
|
+
tags: { type: "string[]", required: false, description: "tags override" },
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
examples: [
|
|
210
|
+
{ description: "dry-run upload (no Steam contact)", cmd: "riu upload ./skins/uav --dry-run --json" },
|
|
211
|
+
{ description: "real upload with overrides", cmd: 'riu upload ./skins/uav --title "Custom UAV v2" --json' },
|
|
212
|
+
],
|
|
213
|
+
outputSuccess: {
|
|
214
|
+
status: '"ok"',
|
|
215
|
+
mode: '"uploaded" | "dry-run"',
|
|
216
|
+
publishedFileId: "Steam workshop file ID (string)",
|
|
217
|
+
url: "https://steamcommunity.com/sharedfiles/filedetails/?id=<id>",
|
|
218
|
+
title: "the title that was set",
|
|
219
|
+
itemType: "the itemType from manifest",
|
|
220
|
+
skinDir: "absolute path",
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "upload-all",
|
|
225
|
+
purpose: "Bulk-publish every skin folder under a parent directory in sequence. Resumes safely on re-run.",
|
|
226
|
+
when: "Publishing many icons at once. Re-run after a partial failure — already-published folders are skipped automatically.",
|
|
227
|
+
positional: [
|
|
228
|
+
{ name: "parent-dir", required: true, description: "directory containing one subfolder per skin" },
|
|
229
|
+
],
|
|
230
|
+
flags: [
|
|
231
|
+
{ flag: "--filter <itemType>", description: "only upload skins matching this itemType" },
|
|
232
|
+
{ flag: "--limit <n>", description: "cap to first N skins (testing)" },
|
|
233
|
+
{ flag: "--continue-on-error", description: "keep going past failures (default: true)" },
|
|
234
|
+
{ flag: "--dry-run", description: "use mock Steam client" },
|
|
235
|
+
{ flag: "--json", description: "NDJSON event stream output" },
|
|
236
|
+
],
|
|
237
|
+
examples: [
|
|
238
|
+
{ description: "bulk dry run", cmd: "riu upload-all ./skins --dry-run --json" },
|
|
239
|
+
{ description: "real bulk upload, only Grenades", cmd: "riu upload-all ./skins --filter Grenade --json" },
|
|
240
|
+
],
|
|
241
|
+
outputSuccess: {
|
|
242
|
+
"(streaming)": "NDJSON: one JSON document per line",
|
|
243
|
+
"{event:'start'}": "{ event, total, dryRun }",
|
|
244
|
+
"{event:'item'}": "{ event, index, title, status: 'uploading'|'success'|'skipped'|'failed', publishedFileId?, url?, reason?, error? }",
|
|
245
|
+
"{event:'summary'}": "{ event, total, success, skipped, failed }",
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "list",
|
|
250
|
+
purpose: "Show skins uploaded via this tool from the local cache",
|
|
251
|
+
when: "After uploading, to see what's been published or to find a publishedFileId for `riu update`",
|
|
252
|
+
flags: [
|
|
253
|
+
{ flag: "--filter <itemType>", description: "only show entries matching itemType" },
|
|
254
|
+
{ flag: "--include-dry-run", description: "include dry-run uploads (filtered out by default)" },
|
|
255
|
+
{ flag: "--json", description: "structured JSON output" },
|
|
256
|
+
],
|
|
257
|
+
examples: [
|
|
258
|
+
{ description: "list all real uploads", cmd: "riu list --json" },
|
|
259
|
+
{ description: "include dry-run entries", cmd: "riu list --include-dry-run --json" },
|
|
260
|
+
],
|
|
261
|
+
outputSuccess: {
|
|
262
|
+
status: '"ok"',
|
|
263
|
+
count: "number of entries returned",
|
|
264
|
+
uploads: "[{ publishedFileId, title, itemType, skinDir, uploadedAt, url, tags, description, dryRun? }, ...]",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "update",
|
|
269
|
+
purpose: "Re-upload the icon for an existing workshop item (the publishedFileId stays the same)",
|
|
270
|
+
when: "Iterating on an icon design after the initial upload",
|
|
271
|
+
positional: [
|
|
272
|
+
{ name: "published-file-id", required: true, description: "PublishedFileId of the existing workshop item" },
|
|
273
|
+
],
|
|
274
|
+
flags: [
|
|
275
|
+
{ flag: "--skin-dir <dir>", description: "skin folder to upload — falls back to local cache lookup if omitted" },
|
|
276
|
+
{ flag: "--note <note>", description: "change note shown in the workshop item history" },
|
|
277
|
+
{ flag: "--dry-run", description: "use mock client" },
|
|
278
|
+
{ flag: "--json [payload]", description: "headless mode" },
|
|
279
|
+
],
|
|
280
|
+
examples: [
|
|
281
|
+
{ description: "update by ID using cached skinDir", cmd: 'riu update 3248306153 --note "v2 colors" --json' },
|
|
282
|
+
{ description: "update with explicit folder", cmd: "riu update 3248306153 --skin-dir ./skins/uav --json" },
|
|
283
|
+
],
|
|
284
|
+
outputSuccess: {
|
|
285
|
+
status: '"ok"',
|
|
286
|
+
mode: '"updated" | "dry-run"',
|
|
287
|
+
publishedFileId: "string",
|
|
288
|
+
url: "string",
|
|
289
|
+
skinDir: "absolute path used",
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: "upgrade",
|
|
294
|
+
purpose: "Upgrade riu to the latest version published on npm",
|
|
295
|
+
when: "When you see the update notice, or to manually check for updates",
|
|
296
|
+
flags: [
|
|
297
|
+
{ flag: "--check", description: "report current vs latest, don't install" },
|
|
298
|
+
{ flag: "--dry-run", description: "show the npm install command without running" },
|
|
299
|
+
{ flag: "--json", description: "structured JSON output" },
|
|
300
|
+
],
|
|
301
|
+
examples: [
|
|
302
|
+
{ description: "check only", cmd: "riu upgrade --check --json" },
|
|
303
|
+
{ description: "do the upgrade", cmd: "riu upgrade --json" },
|
|
304
|
+
],
|
|
305
|
+
outputSuccess: {
|
|
306
|
+
status: '"ok" | "no-update" | "dry-run"',
|
|
307
|
+
currentVersion: "string",
|
|
308
|
+
latestVersion: "string",
|
|
309
|
+
updateAvailable: "boolean",
|
|
310
|
+
packageName: '"@blackasteroid/riu"',
|
|
311
|
+
upgradedTo: "string (when status='ok')",
|
|
312
|
+
command: "string (when --dry-run)",
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "agent-guide",
|
|
317
|
+
purpose: "Print this comprehensive guide. The single source of truth for agents using riu.",
|
|
318
|
+
when: "Whenever an agent picks up the tool cold and needs to understand it",
|
|
319
|
+
flags: [
|
|
320
|
+
{ flag: "--json", description: "output the entire guide as a structured JSON object" },
|
|
321
|
+
{ flag: "--section <name>", description: "print only one section: purpose, mental-model, prerequisites, workflows, commands, errors" },
|
|
322
|
+
],
|
|
323
|
+
examples: [
|
|
324
|
+
{ description: "full markdown manual", cmd: "riu agent-guide" },
|
|
325
|
+
{ description: "structured JSON for agent parsing", cmd: "riu agent-guide --json" },
|
|
326
|
+
{ description: "just the commands schema", cmd: "riu agent-guide --section commands --json" },
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
];
|
|
330
|
+
export const ERROR_ENVELOPE = `Every command in --json mode returns one of two shapes on failure:
|
|
331
|
+
|
|
332
|
+
Validation error (exit 2):
|
|
333
|
+
{"status":"error","error":{"message":"...","field":"<field-name>"}}
|
|
334
|
+
|
|
335
|
+
Runtime error (exit 1):
|
|
336
|
+
{"status":"error","error":{"message":"..."}}
|
|
337
|
+
|
|
338
|
+
Exit codes:
|
|
339
|
+
0 success (or "no update" / "skipped" — both intended states)
|
|
340
|
+
1 runtime error (no config, Steam init failed, network, npm install failed)
|
|
341
|
+
2 validation error (bad JSON payload, missing required field, schema violation)`;
|
|
342
|
+
export const JSON_MODE_RULES = `**Rules of --json mode** (designed for agents):
|
|
343
|
+
|
|
344
|
+
1. **stdout is always one JSON document per command** (or NDJSON for upload-all). Never mixed with human prose.
|
|
345
|
+
2. **stderr may carry side-channel info** (Ink wizards, log lines, the auto-update notice). Agents should ignore stderr unless debugging.
|
|
346
|
+
3. **The auto-update check is automatically suppressed** when --json is anywhere in argv. Same for --version, --help, and the upgrade command itself.
|
|
347
|
+
4. **Exit codes are stable** — see ERROR_ENVELOPE above.
|
|
348
|
+
5. **--dry-run uses a MockSteamClient** that doesn't load libsteam_api.dylib at all and returns synthetic 9_xxx_xxx_xxx file IDs. Use it for any pipeline that doesn't actually need to publish (CI, agent dev, validation runs).`;
|
|
349
|
+
export function buildGuide(name, version) {
|
|
350
|
+
return {
|
|
351
|
+
name,
|
|
352
|
+
version,
|
|
353
|
+
purpose: PURPOSE,
|
|
354
|
+
mentalModel: MENTAL_MODEL,
|
|
355
|
+
prerequisites: PREREQUISITES,
|
|
356
|
+
workflows: WORKFLOWS.map((w) => ({ ...w, steps: [...w.steps] })),
|
|
357
|
+
commands: COMMAND_GUIDE,
|
|
358
|
+
errorEnvelope: ERROR_ENVELOPE,
|
|
359
|
+
jsonModeRules: JSON_MODE_RULES,
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
// Render the guide as a markdown document. The structure mirrors the JSON
|
|
363
|
+
// shape so the two can't drift. Empty sections are skipped — that lets the
|
|
364
|
+
// `--section <name>` flag reuse this same renderer with a slim guide.
|
|
365
|
+
export function renderMarkdown(guide) {
|
|
366
|
+
const out = [];
|
|
367
|
+
out.push(`# ${guide.name} agent guide (v${guide.version})\n`);
|
|
368
|
+
if (guide.purpose) {
|
|
369
|
+
out.push("## Purpose\n");
|
|
370
|
+
out.push(guide.purpose + "\n");
|
|
371
|
+
}
|
|
372
|
+
if (guide.mentalModel) {
|
|
373
|
+
out.push("## Mental model\n");
|
|
374
|
+
out.push(guide.mentalModel + "\n");
|
|
375
|
+
}
|
|
376
|
+
if (guide.prerequisites) {
|
|
377
|
+
out.push("## Prerequisites\n");
|
|
378
|
+
out.push(guide.prerequisites + "\n");
|
|
379
|
+
}
|
|
380
|
+
if (guide.workflows.length > 0) {
|
|
381
|
+
out.push("## Common workflows\n");
|
|
382
|
+
for (const w of guide.workflows) {
|
|
383
|
+
out.push(`### ${w.name} — ${w.description}\n`);
|
|
384
|
+
out.push("```bash");
|
|
385
|
+
for (const step of w.steps)
|
|
386
|
+
out.push(step);
|
|
387
|
+
out.push("```\n");
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (guide.commands.length > 0) {
|
|
391
|
+
out.push("## Commands\n");
|
|
392
|
+
for (const cmd of guide.commands) {
|
|
393
|
+
out.push(`### \`riu ${cmd.name}\`\n`);
|
|
394
|
+
out.push(`**Purpose:** ${cmd.purpose}`);
|
|
395
|
+
out.push("");
|
|
396
|
+
out.push(`**When to use:** ${cmd.when}`);
|
|
397
|
+
out.push("");
|
|
398
|
+
if (cmd.positional && cmd.positional.length > 0) {
|
|
399
|
+
out.push("**Positional args:**");
|
|
400
|
+
for (const p of cmd.positional) {
|
|
401
|
+
out.push(`- \`${p.name}\` ${p.required ? "(required)" : "(optional)"} — ${p.description}`);
|
|
402
|
+
}
|
|
403
|
+
out.push("");
|
|
404
|
+
}
|
|
405
|
+
if (cmd.flags && cmd.flags.length > 0) {
|
|
406
|
+
out.push("**Flags:**");
|
|
407
|
+
for (const f of cmd.flags) {
|
|
408
|
+
out.push(`- \`${f.flag}\` — ${f.description}`);
|
|
409
|
+
}
|
|
410
|
+
out.push("");
|
|
411
|
+
}
|
|
412
|
+
if (cmd.jsonPayload) {
|
|
413
|
+
out.push("**JSON payload schema:**");
|
|
414
|
+
out.push(`> ${cmd.jsonPayload.description}`);
|
|
415
|
+
out.push("");
|
|
416
|
+
for (const [field, info] of Object.entries(cmd.jsonPayload.schema)) {
|
|
417
|
+
out.push(`- \`${field}\` *(${info.type}, ${info.required ? "required" : "optional"})* — ${info.description}`);
|
|
418
|
+
}
|
|
419
|
+
out.push("");
|
|
420
|
+
}
|
|
421
|
+
if (cmd.outputSuccess) {
|
|
422
|
+
out.push("**Output (success):**");
|
|
423
|
+
out.push("```json");
|
|
424
|
+
out.push("{");
|
|
425
|
+
const entries = Object.entries(cmd.outputSuccess);
|
|
426
|
+
entries.forEach(([k, v], i) => {
|
|
427
|
+
const comma = i === entries.length - 1 ? "" : ",";
|
|
428
|
+
out.push(` "${k}": ${v}${comma}`);
|
|
429
|
+
});
|
|
430
|
+
out.push("}");
|
|
431
|
+
out.push("```");
|
|
432
|
+
out.push("");
|
|
433
|
+
}
|
|
434
|
+
out.push("**Examples:**");
|
|
435
|
+
for (const ex of cmd.examples) {
|
|
436
|
+
out.push(`- ${ex.description}:`);
|
|
437
|
+
out.push(" ```bash");
|
|
438
|
+
out.push(" " + ex.cmd);
|
|
439
|
+
out.push(" ```");
|
|
440
|
+
}
|
|
441
|
+
out.push("");
|
|
442
|
+
}
|
|
443
|
+
} // end commands
|
|
444
|
+
if (guide.errorEnvelope) {
|
|
445
|
+
out.push("## Error envelope\n");
|
|
446
|
+
out.push("```");
|
|
447
|
+
out.push(guide.errorEnvelope);
|
|
448
|
+
out.push("```\n");
|
|
449
|
+
}
|
|
450
|
+
if (guide.jsonModeRules) {
|
|
451
|
+
out.push("## JSON mode rules\n");
|
|
452
|
+
out.push(guide.jsonModeRules + "\n");
|
|
453
|
+
}
|
|
454
|
+
return out.join("\n");
|
|
455
|
+
}
|
|
456
|
+
//# sourceMappingURL=manual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual.js","sourceRoot":"","sources":["../../src/agent-guide/manual.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,wEAAwE;AACxE,eAAe;AACf,EAAE;AACF,yEAAyE;AACzE,0CAA0C;AAiB1C,MAAM,CAAC,MAAM,OAAO,GAAG;;;;6JAIsI,CAAC;AAE9J,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;gVAQoT,CAAC;AAEjV,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;yEAK4C,CAAC;AAE1E,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,0CAA0C;QACvD,KAAK,EAAE;YACL,8DAA8D;YAC9D,qHAAqH;YACrH,yEAAyE;YACzE,8DAA8D;SAC/D;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,8BAA8B;QAC3C,KAAK,EAAE;YACL,2DAA2D;YAC3D,0BAA0B;YAC1B,8BAA8B;YAC9B,uIAAuI;YACvI,MAAM;YACN,wDAAwD;YACxD,yCAAyC;YACzC,uDAAuD;SACxD;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,0DAA0D;QACvE,KAAK,EAAE;YACL,+DAA+D;YAC/D,qFAAqF;YACrF,wEAAwE;SACzE;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,6CAA6C;QAC1D,KAAK,EAAE;YACL,+EAA+E;YAC/E,mFAAmF;YACnF,mBAAmB;YACnB,4EAA4E;SAC7E;KACF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C;QACE,IAAI,EAA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C;gBACxB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpB,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;IAED,CAAC,CAAC,eAAe;IAEjB,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAChC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC9B,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;IAED,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACjC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -43,6 +43,33 @@ program
|
|
|
43
43
|
.name("riu")
|
|
44
44
|
.description("Rust workshop icon uploader — automate icon-only skin uploads")
|
|
45
45
|
.version(VERSION, "-v, --version", "print version");
|
|
46
|
+
// Enhanced help: a one-paragraph mission summary at the top + agent pointer
|
|
47
|
+
// at the bottom. The full manual lives in `riu agent-guide`.
|
|
48
|
+
program.addHelpText("beforeAll", `riu — automate publishing icon-only Rust workshop skins
|
|
49
|
+
|
|
50
|
+
Most Rust items aren't on Facepunch's official skinnable list (UAV signal, Patrol Signal,
|
|
51
|
+
money items, etc.). riu uses the icon-only skin trick (empty Textures block, preview image
|
|
52
|
+
becomes the in-game icon) to publish them via the Steam Workshop API. Auto-installs
|
|
53
|
+
libsteam_api.dylib from your local Rust install — you only need your SteamID.
|
|
54
|
+
|
|
55
|
+
Quick start:
|
|
56
|
+
riu init # one-time setup (asks for SteamID, auto-installs SDK)
|
|
57
|
+
riu doctor # verify environment
|
|
58
|
+
riu new # generate a skin folder from an icon PNG
|
|
59
|
+
riu upload ./skins/my-skin --dry-run # validate without contacting Steam
|
|
60
|
+
riu upload ./skins/my-skin # publish for real
|
|
61
|
+
|
|
62
|
+
Every command supports --json (headless / agent mode) and --dry-run (mock Steam client).
|
|
63
|
+
`);
|
|
64
|
+
program.addHelpText("afterAll", `
|
|
65
|
+
For agents and full reference:
|
|
66
|
+
riu agent-guide # comprehensive markdown manual (purpose, workflows, schemas, exit codes)
|
|
67
|
+
riu agent-guide --json # same content as a structured JSON object
|
|
68
|
+
riu agent-guide --section commands --json # just one section
|
|
69
|
+
|
|
70
|
+
Docs: https://github.com/BlackAsteroid/rust-icon-uploader#readme
|
|
71
|
+
Issues: https://github.com/BlackAsteroid/rust-icon-uploader/issues
|
|
72
|
+
`);
|
|
46
73
|
program
|
|
47
74
|
.command("init")
|
|
48
75
|
.description("one-time setup wizard")
|
|
@@ -61,6 +88,18 @@ program
|
|
|
61
88
|
dryRun: rawOpts.dryRun ?? false,
|
|
62
89
|
});
|
|
63
90
|
});
|
|
91
|
+
program
|
|
92
|
+
.command("agent-guide")
|
|
93
|
+
.description("comprehensive manual designed for AI agents (purpose, workflows, schemas, exit codes)")
|
|
94
|
+
.option("--json", "output the entire guide as a structured JSON object")
|
|
95
|
+
.option("--section <name>", "print only one section: purpose, mental-model, prerequisites, workflows, commands, errors, json-mode")
|
|
96
|
+
.action(async (rawOpts) => {
|
|
97
|
+
const { runAgentGuide } = await import("./commands/agent-guide.js");
|
|
98
|
+
runAgentGuide({
|
|
99
|
+
json: rawOpts.json ?? false,
|
|
100
|
+
section: rawOpts.section,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
64
103
|
program
|
|
65
104
|
.command("upgrade")
|
|
66
105
|
.description("upgrade riu to the latest version on npm")
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","s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B,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC,IAAI,KAAK,SAAS;QACpC,WAAW,EAAE,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAC/E,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK;QAC/B,eAAe;QACf,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,aAAa;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { buildGuide, renderMarkdown } from "../agent-guide/manual.js";
|
|
5
|
+
const VALID_SECTIONS = [
|
|
6
|
+
"purpose",
|
|
7
|
+
"mental-model",
|
|
8
|
+
"prerequisites",
|
|
9
|
+
"workflows",
|
|
10
|
+
"commands",
|
|
11
|
+
"errors",
|
|
12
|
+
"json-mode",
|
|
13
|
+
];
|
|
14
|
+
function loadPkg() {
|
|
15
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
const pkgPath = join(here, "..", "..", "package.json");
|
|
17
|
+
return JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
18
|
+
}
|
|
19
|
+
function pickSection(guide, section) {
|
|
20
|
+
switch (section) {
|
|
21
|
+
case "purpose":
|
|
22
|
+
return { purpose: guide.purpose };
|
|
23
|
+
case "mental-model":
|
|
24
|
+
return { mentalModel: guide.mentalModel };
|
|
25
|
+
case "prerequisites":
|
|
26
|
+
return { prerequisites: guide.prerequisites };
|
|
27
|
+
case "workflows":
|
|
28
|
+
return { workflows: guide.workflows };
|
|
29
|
+
case "commands":
|
|
30
|
+
return { commands: guide.commands };
|
|
31
|
+
case "errors":
|
|
32
|
+
return { errorEnvelope: guide.errorEnvelope };
|
|
33
|
+
case "json-mode":
|
|
34
|
+
return { jsonModeRules: guide.jsonModeRules };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function isValidSection(s) {
|
|
38
|
+
return VALID_SECTIONS.includes(s);
|
|
39
|
+
}
|
|
40
|
+
export function runAgentGuide(opts) {
|
|
41
|
+
const pkg = loadPkg();
|
|
42
|
+
const guide = buildGuide(pkg.name, pkg.version);
|
|
43
|
+
if (opts.section) {
|
|
44
|
+
if (!isValidSection(opts.section)) {
|
|
45
|
+
const msg = `unknown section "${opts.section}". Valid: ${VALID_SECTIONS.join(", ")}`;
|
|
46
|
+
if (opts.json) {
|
|
47
|
+
process.stdout.write(JSON.stringify({ status: "error", error: { message: msg } }) + "\n");
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
process.stderr.write(`error: ${msg}\n`);
|
|
51
|
+
}
|
|
52
|
+
process.exit(2);
|
|
53
|
+
}
|
|
54
|
+
const sub = pickSection(guide, opts.section);
|
|
55
|
+
if (opts.json) {
|
|
56
|
+
process.stdout.write(JSON.stringify(sub) + "\n");
|
|
57
|
+
process.exit(0);
|
|
58
|
+
}
|
|
59
|
+
// Human-readable single section: render only the relevant slice of the
|
|
60
|
+
// markdown by building a slim guide and reusing the renderer.
|
|
61
|
+
const slim = {
|
|
62
|
+
name: guide.name,
|
|
63
|
+
version: guide.version,
|
|
64
|
+
purpose: opts.section === "purpose" ? guide.purpose : "",
|
|
65
|
+
mentalModel: opts.section === "mental-model" ? guide.mentalModel : "",
|
|
66
|
+
prerequisites: opts.section === "prerequisites" ? guide.prerequisites : "",
|
|
67
|
+
workflows: opts.section === "workflows" ? guide.workflows : [],
|
|
68
|
+
commands: opts.section === "commands" ? guide.commands : [],
|
|
69
|
+
errorEnvelope: opts.section === "errors" ? guide.errorEnvelope : "",
|
|
70
|
+
jsonModeRules: opts.section === "json-mode" ? guide.jsonModeRules : "",
|
|
71
|
+
};
|
|
72
|
+
process.stdout.write(renderMarkdown(slim));
|
|
73
|
+
process.exit(0);
|
|
74
|
+
}
|
|
75
|
+
if (opts.json) {
|
|
76
|
+
process.stdout.write(JSON.stringify(guide) + "\n");
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
79
|
+
process.stdout.write(renderMarkdown(guide));
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=agent-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-guide.js","sourceRoot":"","sources":["../../src/commands/agent-guide.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAmB,MAAM,0BAA0B,CAAC;AAOvF,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,cAAc;IACd,eAAe;IACf,WAAW;IACX,UAAU;IACV,QAAQ;IACR,WAAW;CACH,CAAC;AAGX,SAAS,OAAO;IACd,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,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C,CAAC,EAAE;YAC9D,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC3D,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;YACnE,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;SACvE,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackasteroid/riu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Automate uploading icon-only Rust workshop skins from the command line. Generate manifests, validate icons, and push to Steam Workshop — interactively or via JSON for agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|