@follenfang/wowdoc 0.0.1 → 0.0.3
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 +136 -4
- package/package.json +2 -2
- package/scripts/install.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,152 @@
|
|
|
1
1
|
# wowdoc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/Follen/wowdoc/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@follenfang/wowdoc)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
`wowdoc` gives coding agents versioned, auditable code references for World of Warcraft UI source and popular AddOns. It resolves a branch, Tag, version, or Commit to an immutable snapshot and returns the exact repository path, line, excerpt, content hash, and resolved Commit behind every answer.
|
|
8
|
+
|
|
9
|
+
The product is CLI-only. The included Agent Skill translates a natural-language question into small, stable CLI commands; the CLI handles Git, parsing, indexing, and evidence.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
4
12
|
|
|
5
13
|
```powershell
|
|
6
14
|
npm install -g @follenfang/wowdoc
|
|
15
|
+
wowdoc --version
|
|
16
|
+
wowdata --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The package installs:
|
|
20
|
+
|
|
21
|
+
- `wowdoc`: read-only source queries and explicit source/index operations;
|
|
22
|
+
- `wowdata`: local data initialization, update, cleanup, and uninstall;
|
|
23
|
+
- the `wowdoc` Skill in `~/.agents/skills/wowdoc`.
|
|
24
|
+
|
|
25
|
+
Run the one-time data initialization before querying source:
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
7
28
|
wowdata init
|
|
8
|
-
wowdoc query --source wow-ui-source --product retail --text C_AuctionHouse.GetItemSearchResultInfo
|
|
9
29
|
```
|
|
10
30
|
|
|
11
|
-
|
|
31
|
+
Initialization creates `~/.wowdoc`, fetches the configured Git mirrors, and builds searchable SQLite snapshots for each product branch and its hot Tags. It can take time and substantial disk space. The command is resumable: rerunning it keeps completed work and continues failed or pending snapshots.
|
|
32
|
+
|
|
33
|
+
If Git is missing, `wowdata init` detects the platform package manager, shows the exact package and installer command, installs Git, refreshes `PATH`, and verifies `git --version`. `wowdoc doctor` remains read-only.
|
|
34
|
+
|
|
35
|
+
## Supported source
|
|
36
|
+
|
|
37
|
+
| Source | Products |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Blizzard UI source | Retail, PTR, PTR2, Beta, Classic, Classic PTR/Beta, Classic Era/PTR, Anniversary, Titan |
|
|
40
|
+
| ElvUI | main, PTR |
|
|
41
|
+
| WeakAuras | main |
|
|
42
|
+
| NDui | main, Classic, Era, Anniversary, Titan |
|
|
43
|
+
| EllesmereUI | main |
|
|
44
|
+
|
|
45
|
+
Third-party versions use Git truth: `Tag -> Commit -> snapshot`. Release archives and installed AddOn folders can differ because packaging may inject externals or replace placeholders; wowdoc describes Tag source rather than pretending to reconstruct an installed ZIP byte for byte.
|
|
46
|
+
|
|
47
|
+
## Query source
|
|
48
|
+
|
|
49
|
+
Find an API definition:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
wowdoc query `
|
|
53
|
+
--source wow-ui-source `
|
|
54
|
+
--product retail `
|
|
55
|
+
--ref latest `
|
|
56
|
+
--topic api `
|
|
57
|
+
--text C_AuctionHouse.GetItemSearchResultInfo
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Inspect a known ElvUI function at an exact plugin version:
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
wowdoc inspect `
|
|
64
|
+
--source elvui `
|
|
65
|
+
--product main `
|
|
66
|
+
--ref v15.18 `
|
|
67
|
+
--symbol 'lib:RegisterPlugin'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Compare two retained versions:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
wowdoc diff `
|
|
74
|
+
--source weakauras `
|
|
75
|
+
--product main `
|
|
76
|
+
--from 5.20.7 `
|
|
77
|
+
--to 5.21.9
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Every successful reference identifies its `sourceId`, product, requested ref, matched Tag when present, resolved Commit, repository path, line, excerpt, and SHA-256 content hash. Queries read only published SQLite snapshots and content-addressed objects; they do not switch a shared checkout or silently access the network.
|
|
81
|
+
|
|
82
|
+
## Commands
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
wowdoc query|explore|inspect|diff|validate
|
|
86
|
+
wowdoc source list|check|sync
|
|
87
|
+
wowdoc index build|refresh|status
|
|
88
|
+
wowdoc doctor
|
|
89
|
+
|
|
90
|
+
wowdata init|update|clean|uninstall
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Common lifecycle:
|
|
94
|
+
|
|
95
|
+
```powershell
|
|
96
|
+
# Check whether a branch changed without modifying local state
|
|
97
|
+
wowdoc source check --source elvui --product main
|
|
98
|
+
|
|
99
|
+
# Explicitly fetch new Git metadata and source objects
|
|
100
|
+
wowdoc source sync --source elvui --product main
|
|
101
|
+
|
|
102
|
+
# Build and atomically publish the new snapshot
|
|
103
|
+
wowdoc index refresh --source elvui --product main --ref latest
|
|
104
|
+
|
|
105
|
+
# Preview cleanup; no files are deleted
|
|
106
|
+
wowdata clean
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use `wowdata clean --apply` only after reviewing its candidates. Removing indexed versions requires an explicit version or range. `wowdata uninstall` requires confirmation and removes the npm package, managed Skill, and `~/.wowdoc` data.
|
|
110
|
+
|
|
111
|
+
## Storage model
|
|
112
|
+
|
|
113
|
+
Local state lives under `~/.wowdoc`:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
config/ versioned source catalog and local configuration
|
|
117
|
+
repositories/ bare partial Git mirrors
|
|
118
|
+
objects/ content-addressed source and asset bytes
|
|
119
|
+
ast/ auditable per-file JSON syntax trees
|
|
120
|
+
indexes/ one WAL SQLite database per product branch
|
|
121
|
+
manifests/ immutable snapshot manifests
|
|
122
|
+
state/ initialization and task state
|
|
123
|
+
tmp/worktrees/ leased detached worktrees used only while parsing
|
|
124
|
+
locks/ repository and snapshot build locks
|
|
125
|
+
logs/ local diagnostics
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Each parser task fixes the requested ref to a Commit and creates its own detached worktree. Published queries never depend on that worktree. Identical Git blobs and AST objects are reused across Tags and branches, while snapshot relationships remain isolated by product and Commit.
|
|
129
|
+
|
|
130
|
+
## Agent integration
|
|
131
|
+
|
|
132
|
+
The installed Skill contains source/product aliases and command-selection rules, not copied source facts. An Agent chooses the source, product, ref, topic, and narrowest useful identifier, then cites the CLI evidence. A missing exact plugin Tag can fall back to that product branch's latest snapshot only when the Skill labels the result as a latest fallback and preserves the originally requested version.
|
|
133
|
+
|
|
134
|
+
The quality suite contains 50 realistic AddOn-author questions across all configured product branches and historical Tags. A strict pass requires the first reference to be correct, relevant, context-complete, version-correct, and byte-for-byte traceable to the resolved Git blob. The current report is in [`quality/report.md`](quality/report.md).
|
|
12
135
|
|
|
13
136
|
## Development
|
|
14
137
|
|
|
138
|
+
Requirements: Go 1.23+, Node.js 20+, and Git.
|
|
139
|
+
|
|
15
140
|
```powershell
|
|
16
141
|
go test ./...
|
|
142
|
+
go vet ./...
|
|
143
|
+
npm pack --dry-run
|
|
17
144
|
go run ./cmd/wowdoc --help
|
|
18
145
|
go run ./cmd/wowdata --help
|
|
19
|
-
npm pack --ignore-scripts
|
|
20
146
|
```
|
|
147
|
+
|
|
148
|
+
Release tags use `vMAJOR.MINOR.PATCH`. GitHub Actions tests the project, builds `wowdoc` and `wowdata` for Windows amd64, Linux amd64/arm64, and macOS amd64/arm64, publishes checksums and a GitHub Release, then publishes the matching npm version through npm Trusted Publisher OIDC with provenance.
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@follenfang/wowdoc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Auditable WoW UI source intelligence CLI for coding agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "
|
|
9
|
+
"url": "https://github.com/Follen/wowdoc"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
12
|
"wowdoc": "bin/wowdoc.mjs",
|
package/scripts/install.mjs
CHANGED
|
@@ -29,7 +29,7 @@ for (const name of ["wowdoc", "wowdata"]) {
|
|
|
29
29
|
execFileSync("go", ["build", "-trimpath", "-ldflags", `-s -w -X github.com/follenfang/wowdoc/internal/app.Version=${pkg.version}`, "-o", target, `./cmd/${name}`], { cwd: root, stdio: "inherit" });
|
|
30
30
|
} else {
|
|
31
31
|
const asset = `${name}-${platform}${suffix}`;
|
|
32
|
-
const url = `https://github.com/
|
|
32
|
+
const url = `https://github.com/Follen/wowdoc/releases/download/v${pkg.version}/${asset}`;
|
|
33
33
|
const response = await fetch(url, { redirect: "follow" });
|
|
34
34
|
if (!response.ok) throw new Error(`binary_download_failed: ${response.status} ${url}`);
|
|
35
35
|
writeFileSync(target, Buffer.from(await response.arrayBuffer()));
|