@follenfang/wowdata 0.0.1 → 0.0.2
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/LICENSE +10 -10
- package/README.md +25 -0
- package/dist/SHA256SUMS +5 -0
- package/dist/wowdata-darwin-amd64 +0 -0
- package/dist/wowdata-darwin-arm64 +0 -0
- package/dist/wowdata-linux-amd64 +0 -0
- package/dist/wowdata-linux-arm64 +0 -0
- package/dist/wowdata-windows-amd64.exe +0 -0
- package/package.json +1 -1
- package/skill/wowdata/SKILL.md +35 -19
- package/skill/wowdata/VERSION +1 -1
- package/skill/wowdata/agents/openai.yaml +3 -3
- package/skill/wowdata/references/clients.yaml +16 -0
- package/skill/wowdata/references/commands.md +81 -20
package/LICENSE
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
2
|
-
Version 3, 19 November 2007
|
|
3
|
-
|
|
4
|
-
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
-
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
|
6
|
-
|
|
7
|
-
wowdata is licensed under the GNU Affero General Public License version 3 or any later version.
|
|
8
|
-
|
|
9
|
-
Full license text:
|
|
10
|
-
https://www.gnu.org/licenses/agpl-3.0.txt
|
|
1
|
+
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 19 November 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
|
6
|
+
|
|
7
|
+
wowdata is licensed under the GNU Affero General Public License version 3 or any later version.
|
|
8
|
+
|
|
9
|
+
Full license text:
|
|
10
|
+
https://www.gnu.org/licenses/agpl-3.0.txt
|
package/README.md
CHANGED
|
@@ -62,6 +62,27 @@ CLI 会在同一次命令中:
|
|
|
62
62
|
|
|
63
63
|
准备和下载进度写入 stderr,最终结构化结果写入 stdout JSON。多个独立 CDN 对象和清单默认使用 4 个 worker 并发下载;可以通过 `wowdata cache config --workers N` 调整。
|
|
64
64
|
|
|
65
|
+
## 输出和退出码
|
|
66
|
+
|
|
67
|
+
CLI 可以直接用于 Agent,也可以作为普通 Shell 命令组合:
|
|
68
|
+
|
|
69
|
+
- 成功结果为 `"ok": true`,进程退出码为 `0`。
|
|
70
|
+
- 业务错误为 `"ok": false`,错误详情仍是 stdout 中的 JSON,进程退出码为 `1`。
|
|
71
|
+
- 准备和下载进度只写入 stderr,不会污染 stdout JSON。
|
|
72
|
+
- 参数拼写错误等尚未进入命令处理器的错误写入 stderr,并返回退出码 `1`。
|
|
73
|
+
|
|
74
|
+
因此脚本既可以判断退出码,也可以继续解析结构化错误:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
if wowdata db2 rows SpellName --id 133 \
|
|
78
|
+
--source remote --region cn --product wow --build latest --locale zhCN \
|
|
79
|
+
>result.json; then
|
|
80
|
+
jq '.data.rows' result.json
|
|
81
|
+
else
|
|
82
|
+
jq '.error' result.json
|
|
83
|
+
fi
|
|
84
|
+
```
|
|
85
|
+
|
|
65
86
|
## 发现与提前准备
|
|
66
87
|
|
|
67
88
|
查看某个区域当前提供的真实产品和 Build 组合:
|
|
@@ -170,6 +191,10 @@ git push origin v1.2.3
|
|
|
170
191
|
|
|
171
192
|
工作流会测试 Go 和 npm、构建五个平台、生成 `SHA256SUMS`、创建 GitHub Release,并发布同版本 `@follenfang/wowdata`。
|
|
172
193
|
|
|
194
|
+
npm 发布使用绑定到 `Follen/wowdata` 和 `release.yml` 的 Trusted Publisher OIDC,不需要在 GitHub Secrets 中保存 `NPM_TOKEN`。发布 job 固定使用 npm `11.18.0`,并生成 npm provenance。
|
|
195
|
+
|
|
196
|
+
npm 版本不可覆盖:`0.0.1` 已经发布,后续正式发布从更高的新版本 tag 开始,例如 `v0.0.2`。
|
|
197
|
+
|
|
173
198
|
## License
|
|
174
199
|
|
|
175
200
|
AGPL-3.0-or-later
|
package/dist/SHA256SUMS
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
c518635ebf3dcdf92b39510ec9fb3f25df27e7eb0132b177553bdeae15089452 dist/wowdata-darwin-amd64
|
|
2
|
+
10470811b3fb51abed29d28ff5548f272ce3939556a16321b94ae85d1736f8be dist/wowdata-darwin-arm64
|
|
3
|
+
009d40358915132df84dcdf7e9275f4fef9161a390ccc8b1beaa43763564e8ea dist/wowdata-linux-amd64
|
|
4
|
+
46528408a4ba3ba6b05e0469f7356ae1945386337e0e2305f037a26e2c96e66a dist/wowdata-linux-arm64
|
|
5
|
+
397884735b784690b01188399cf140ea05bf98494478ada7b7c57c2b31ca0d9d dist/wowdata-windows-amd64.exe
|
|
Binary file
|
|
Binary file
|
package/dist/wowdata-linux-amd64
CHANGED
|
Binary file
|
package/dist/wowdata-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/skill/wowdata/SKILL.md
CHANGED
|
@@ -1,39 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wowdata
|
|
3
|
-
description:
|
|
3
|
+
description: Query and export World of Warcraft game data with the wowdata CLI, including CASC and DB2 schemas and rows, files, icons, textures, spells, encounters, items, creatures, decor, Builds, profiles, cache, and diagnostics. Use when a user asks to inspect or export WoW data from a local client or CDN, resolve a product/Build/locale target, or diagnose wowdata.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# wowdata
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use the `wowdata` executable from `PATH`. This Skill is CLI-only: do not search for a bundled executable and do not use MCP or another server transport.
|
|
9
9
|
|
|
10
|
-
## Target
|
|
10
|
+
## Resolve The Target
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Resolve the target before running a command that reads CASC or DB2 data.
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
14
|
+
1. If the user gives a Profile, pass only `--profile <name>`. Do not combine a Profile with target flags.
|
|
15
|
+
2. Resolve the product from the user's words or established conversation context. Read [clients.yaml](references/clients.yaml) for English and Chinese aliases. Product has no default; if it is still missing or ambiguous, ask one short product question and do not run a data command yet. Treat “硬核服” as a server rule, not a product: resolve its classic-era or anniversary product from context, or ask which one.
|
|
16
|
+
3. Preserve every explicit source, path, region, product, Build, and locale value.
|
|
17
|
+
4. When no source or local path is stated, use remote CDN data.
|
|
18
|
+
5. For an otherwise unspecified remote target, pass `--source remote --region cn --build latest --locale zhCN` plus the resolved product.
|
|
19
|
+
6. For `--source local`, require the client `--path` and complete every remaining target field explicitly. Do not replace missing local-client facts with guesses.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Never rely on CLI target defaults; the CLI intentionally has none. `--build latest` resolves at execution time, so never store a current Build number in this Skill. Read [locales.yaml](references/locales.yaml) when mapping natural-language locale names.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Commands that do not read a game target do not need the full target: `video demux`, `doctor`, `cache`, `profile`, `update`, and `uninstall`. `casc products` uses only source discovery flags such as `--source remote --region cn` or `--source local --path <client>`.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
## Run Atomic Commands
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Call the business command directly. Do not run `warmup` before an ordinary query. The CLI checks Build identity and cache integrity, downloads missing data, then completes the original query in the same process.
|
|
28
|
+
|
|
29
|
+
- Use `casc products` when the user asks which products or Builds exist.
|
|
30
|
+
- Use `warmup` only when the user explicitly asks to download data ahead of time.
|
|
31
|
+
- Use `doctor` after an environment, target, cache, or network failure needs diagnosis.
|
|
32
|
+
- Read [commands.md](references/commands.md) before composing an unfamiliar command.
|
|
33
|
+
- Read [tables.yaml](references/tables.yaml) when translating a semantic request into DB2 tables.
|
|
34
|
+
- Never invent a DB2 field name from a natural-language label. If the user requests selected fields without giving exact schema names, run `db2 schema <table>` first, then use names returned by that schema.
|
|
35
|
+
- Use `db2 rows`, never the obsolete `query rows` spelling.
|
|
36
|
+
- Keep exports at the user-requested path, or in the current workspace when no path is given.
|
|
37
|
+
- Do not run `cache clear`, `profile remove`, `update`, or `uninstall` unless the user explicitly requests that action.
|
|
26
38
|
|
|
27
39
|
```powershell
|
|
28
|
-
wowdata db2 rows SpellName --id
|
|
29
|
-
wowdata
|
|
40
|
+
wowdata db2 rows SpellName --id 133 --source remote --region cn --product wow --build latest --locale zhCN
|
|
41
|
+
wowdata item textures --item-id 19019 --profile retail-cn
|
|
30
42
|
wowdata icon export --file-data-id 134400 --format png --output output/icon.png --source remote --region cn --product wow --build latest --locale zhCN
|
|
31
|
-
wowdata casc products --source remote --region cn
|
|
32
|
-
wowdata doctor
|
|
33
43
|
```
|
|
34
44
|
|
|
35
|
-
Read
|
|
45
|
+
## Read Results
|
|
46
|
+
|
|
47
|
+
Treat the streams and exit status as one contract:
|
|
36
48
|
|
|
37
|
-
|
|
49
|
+
- stderr contains preparation and download progress. If it reports `prepare` or `download`, let the command continue; do not start a separate warmup.
|
|
50
|
+
- stdout contains the final JSON. `db2 stream` defaults to JSONL; parse it line by line or pass `--format json` when one JSON document is preferable.
|
|
51
|
+
- Exit code `0` corresponds to `"ok": true`.
|
|
52
|
+
- Exit code `1` with JSON stdout corresponds to `"ok": false`; report `error.code` and `error.message`. A CLI parsing error may instead be plain stderr.
|
|
53
|
+
- An `"ok": true` response with zero rows is a valid empty result. Recheck the ID, product, Build, and locale before trying another query.
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
Return the requested result, not download narration. Preserve the product, resolved Build, region, locale, table or ID, and output path/hash when present so the answer remains traceable.
|
package/skill/wowdata/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.2
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
|
-
display_name: wowdata
|
|
3
|
-
short_description: Query and export World of Warcraft data
|
|
4
|
-
default_prompt: Use wowdata
|
|
2
|
+
display_name: "wowdata"
|
|
3
|
+
short_description: "Query and export World of Warcraft data with the wowdata CLI"
|
|
4
|
+
default_prompt: "Use $wowdata to query or export WoW data with an explicit product and a complete target."
|
|
@@ -2,12 +2,28 @@ schema: wowdata.clients.v1
|
|
|
2
2
|
clients:
|
|
3
3
|
retail: wow
|
|
4
4
|
ptr: wowt
|
|
5
|
+
正式服测试服: wowt
|
|
6
|
+
"正式服 PTR": wowt
|
|
5
7
|
ptr2: wowxptr
|
|
6
8
|
beta: wow_beta
|
|
7
9
|
classic: wow_classic
|
|
10
|
+
怀旧服: wow_classic
|
|
8
11
|
classic-ptr: wow_classic_ptr
|
|
12
|
+
"怀旧服 PTR": wow_classic_ptr
|
|
13
|
+
怀旧服测试服: wow_classic_ptr
|
|
9
14
|
classic-beta: wow_classic_beta
|
|
10
15
|
classic-era: wow_classic_era
|
|
16
|
+
怀中怀: wow_classic_era
|
|
17
|
+
"60级": wow_classic_era
|
|
18
|
+
香草服: wow_classic_era
|
|
11
19
|
classic-era-ptr: wow_classic_era_ptr
|
|
12
20
|
classic-anniversary: wow_anniversary
|
|
13
21
|
classic-titan: wow_classic_titan
|
|
22
|
+
泰坦服: wow_classic_titan
|
|
23
|
+
泰坦重铸: wow_classic_titan
|
|
24
|
+
时光服: wow_classic_titan
|
|
25
|
+
contextualAliases:
|
|
26
|
+
硬核服:
|
|
27
|
+
type: realm-rule
|
|
28
|
+
products: [wow_classic_era, wow_anniversary]
|
|
29
|
+
instruction: Do not treat as a product. Resolve the underlying classic-era or anniversary product from context; ask which one when unclear.
|
|
@@ -1,24 +1,85 @@
|
|
|
1
1
|
# Command Reference
|
|
2
2
|
|
|
3
|
-
Run `wowdata <command> --help` when a flag is uncertain.
|
|
3
|
+
Run `wowdata <command> --help` when a flag is uncertain.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
For commands that read CASC or DB2, append either:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
--profile <name>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
or a complete target:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
--source remote --region <region> --product <product> --build <latest|version|build-id|config-key> --locale <locale>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Use `--source local --path <client>` plus explicit region, product, Build, and locale for a local client.
|
|
18
|
+
|
|
19
|
+
## Discovery And Preparation
|
|
20
|
+
|
|
21
|
+
| Intent | Command |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| List remote product/Build/locale combinations | `casc products --source remote --region <region>` |
|
|
24
|
+
| List local client combinations | `casc products --source local --path <client>` |
|
|
25
|
+
| Inspect resolved CASC and Build state | `casc info <target>` |
|
|
26
|
+
| Diagnose CDN, root, encoding, archive, cache, and TACT state | `casc diagnose <target>` |
|
|
27
|
+
| Download ahead of time | `warmup <target>` |
|
|
28
|
+
|
|
29
|
+
Ordinary queries prepare their own dependencies. Do not call `warmup` as a prerequisite.
|
|
30
|
+
|
|
31
|
+
## DB2 And Domain Queries
|
|
32
|
+
|
|
33
|
+
| Intent | Command |
|
|
6
34
|
| --- | --- |
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
| Inspect table fields and row count | `db2 schema <table> <target>` |
|
|
36
|
+
| Read rows by ID | `db2 rows <table> --id <id[,id...]> [--fields <field,...>] <target>` |
|
|
37
|
+
| Read multiple IDs | `db2 rows <table> --ids <id,...> <target>` |
|
|
38
|
+
| Filter rows | `db2 rows <table> --filter <field=value> [--limit N] <target>` |
|
|
39
|
+
| Search localized or text fields | `db2 search <table> --field <field> --query <text> [--limit N] <target>` |
|
|
40
|
+
| Follow a numeric relation | `db2 foreign-key <table> --field <field> --value <id> <target>` |
|
|
41
|
+
| Stream a large table | `db2 stream <table> [--fields <field,...>] [--filter <field=value>] [--limit N] [--format jsonl|json] <target>` |
|
|
42
|
+
| Inspect spell relationships | `spell info --spell-id <id> [--max-depth N] <target>` |
|
|
43
|
+
| Detect spell aura behavior | `spell auras --spell-id <id> <target>` |
|
|
44
|
+
| Detect summoned NPCs | `spell summons --spell-id <id> [--npc-id <id>] <target>` |
|
|
45
|
+
| Read an encounter section tree | `encounter get --journal-encounter-id <id> <target>` |
|
|
46
|
+
| Read item metadata | `item get --item-id <id> <target>` |
|
|
47
|
+
| Read item model and texture IDs | `item models --item-id <id> [--race-id N] [--gender 0|1] <target>` |
|
|
48
|
+
| Read item geosets | `item geosets --item-id <id> <target>` |
|
|
49
|
+
| Read item textures | `item textures --item-id <id> <target>` |
|
|
50
|
+
| Read a creature display | `creature display (--display-id <id>|--file-data-id <id>) <target>` |
|
|
51
|
+
| Find displays for a creature model | `creature model --file-data-id <id> <target>` |
|
|
52
|
+
| List decor | `decor list [--limit N] <target>` |
|
|
53
|
+
| Read decor | `decor get (--id <id>|--model-file-data-id <id>) <target>` |
|
|
54
|
+
|
|
55
|
+
Never translate a semantic label such as "name", "description", or "model" directly into a guessed DB2 field. When exact field names are not supplied, run `db2 schema` first and use the returned names. Then use `--fields` to keep large row responses focused.
|
|
56
|
+
|
|
57
|
+
## Files And Media
|
|
58
|
+
|
|
59
|
+
| Intent | Command |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| Resolve a fileDataID | `file lookup --file-data-id <id> <target>` |
|
|
62
|
+
| Search names in the listfile | `file search --query <text> [--limit N] <target>` |
|
|
63
|
+
| List by extension | `file extension --extension <ext> [--limit N] <target>` |
|
|
64
|
+
| Read file size and hash | `file get (--file-data-id <id>|--filename <name>) <target>` |
|
|
65
|
+
| Read or write a raw file | `file get (--file-data-id <id>|--filename <name>) --output <path> <target>` |
|
|
66
|
+
| Test existence | `file exists (--file-data-id <id>|--filename <name>) <target>` |
|
|
67
|
+
| Inspect content/encoding keys | `file encoding --file-data-id <id> <target>` |
|
|
68
|
+
| Export a raw file | `file export (--file-data-id <id>|--filename <name>) --output <path> <target>` |
|
|
69
|
+
| Decode a BLP texture | `icon export --file-data-id <id> --format png|webp --output <path> [--mipmap N] [--mask N] <target>` |
|
|
70
|
+
| Inspect a local VP9 AVI container | `video demux --input <file> [--output <directory>]` |
|
|
71
|
+
|
|
72
|
+
`file get` without `--output` returns metadata, not raw bytes in JSON. Use `file export` or `file get --output` when the user needs an artifact.
|
|
73
|
+
|
|
74
|
+
## Profiles, Cache, And Maintenance
|
|
75
|
+
|
|
76
|
+
| Intent | Command |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| Manage complete targets | `profile list`, `profile show <name>`, `profile set <name> <target>`, `profile remove <name>` |
|
|
79
|
+
| Inspect or verify cache | `cache status`, `cache verify` |
|
|
80
|
+
| Manage cache | `cache prune`, `cache clear`, `cache config [--max-gb N] [--workers N]` |
|
|
81
|
+
| Diagnose installation | `doctor` |
|
|
82
|
+
| Update package | `update [--version latest|x.y.z]` |
|
|
83
|
+
| Uninstall | `uninstall [--keep-data]` |
|
|
84
|
+
|
|
85
|
+
Profile flags and explicit target flags are mutually exclusive. Treat cache clearing, Profile removal, update, and uninstall as explicit user actions.
|