werewolf-ui 0.1.0-alpha.0 → 0.1.0-alpha.1
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 +1 -53
- package/README.md +63 -14
- package/data/manifest.json +4256 -1746
- package/dist/cli.mjs +1870 -1552
- package/dist/core.mjs +213 -74
- package/dist/lint.mjs +203 -66
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,58 +1,6 @@
|
|
|
1
|
-
Proprietary. All rights reserved.
|
|
2
|
-
|
|
3
|
-
Commercial terms are pending. This local alpha package is not a public release.
|
|
4
|
-
|
|
5
|
-
Bundled dependency notice: culori
|
|
6
|
-
|
|
7
|
-
MIT License
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2018 Dan Burzo
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions:
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|
|
28
|
-
|
|
29
|
-
Bundled dependency notice: culori: included color model
|
|
30
|
-
|
|
31
|
-
Copyright (c) 2021 Björn Ottosson
|
|
32
|
-
|
|
33
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
34
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
35
|
-
the Software without restriction, including without limitation the rights to
|
|
36
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
37
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
38
|
-
so, subject to the following conditions:
|
|
39
|
-
|
|
40
|
-
The above copyright notice and this permission notice shall be included in all
|
|
41
|
-
copies or substantial portions of the Software.
|
|
42
|
-
|
|
43
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
44
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
45
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
46
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
47
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
48
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
49
|
-
SOFTWARE.
|
|
50
|
-
|
|
51
|
-
Bundled dependency notice: colorjs.io
|
|
52
|
-
|
|
53
1
|
MIT License
|
|
54
2
|
|
|
55
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Nguyễn Duy Khánh
|
|
56
4
|
|
|
57
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
58
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Werewolf CLI (
|
|
1
|
+
# Werewolf CLI (alpha)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Published on npm as `werewolf-ui@0.1.0-alpha.0` (dist tags `latest` and `alpha`). Run it with `npx werewolf-ui` from a supported app. Component APIs remain draft.
|
|
4
4
|
|
|
5
5
|
## Platform token export (E1, shipped in PR #134)
|
|
6
6
|
|
|
7
|
-
After
|
|
7
|
+
After initializing a supported app, select one
|
|
8
8
|
platform and a directory relative to that app's root:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
@@ -57,7 +57,7 @@ Cancellation returns 130. No package-manager process runs during export.
|
|
|
57
57
|
|
|
58
58
|
## Consumer lint (C3, shipped in PR #129)
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Select the supported app with `--cwd`:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
npx werewolf-ui lint --json
|
|
@@ -144,7 +144,7 @@ only http(s) URLs and waits at most 5 seconds. Failure keeps exit 0, sets
|
|
|
144
144
|
`opened: false` and adds a `WW_OPEN` warning. All opener branches are tested with
|
|
145
145
|
an injected spawn; a real browser launch is not part of the suite.
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
From any directory:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
150
|
npx werewolf-ui --help
|
|
@@ -187,7 +187,7 @@ build's web/JSON output bytes. E1 changes only the five native sizing constants
|
|
|
187
187
|
approved by Joey on 2026-10-13; native formatting is pending review. The build
|
|
188
188
|
tools remain development dependencies.
|
|
189
189
|
|
|
190
|
-
B1 exposes internal project modules in the
|
|
190
|
+
B1 exposes internal project modules in the package: `dist/project.mjs`,
|
|
191
191
|
`dist/paths.mjs` and `dist/package-manager.mjs`. B2 consumes these modules for init.
|
|
192
192
|
`detectProject({cwd,overrides})` reads only the selected app's configuration and
|
|
193
193
|
returns root, framework, packageManager, config, reactVersion, tailwindVersion
|
|
@@ -236,7 +236,7 @@ existing seed supplies the generated stylesheet and retains all bytes and
|
|
|
236
236
|
metadata. Invalid seeds, missing styling imports, incompatible config and file
|
|
237
237
|
conflicts fail before mutation. Init adds one relative theme import after the
|
|
238
238
|
styling import, preserving the CSS BOM, newline style, comments and rules.
|
|
239
|
-
Use --css, --seed, --output
|
|
239
|
+
Use --css, --seed, --output, --package-manager and --agent to select explicit defaults;
|
|
240
240
|
edit an existing werewolf.json explicitly when changing its stored choices.
|
|
241
241
|
|
|
242
242
|
Init installs .agents/skills/werewolf-design/SKILL.md, a managed block delimited
|
|
@@ -246,6 +246,55 @@ intact. It does not install dependencies or write MCP client configuration.
|
|
|
246
246
|
The core's internal getInitAssets() returns isolated copies of the selected
|
|
247
247
|
package's default DTCG seed and design rules.
|
|
248
248
|
|
|
249
|
+
Init writes AGENTS.md, .agents/skills/werewolf-design/SKILL.md and the files
|
|
250
|
+
of the selected coding agents. Select agents with --agent <id>; it accepts
|
|
251
|
+
comma lists, repeats and `all`. An unknown id returns WW_PROJECT_CONFIG with
|
|
252
|
+
exit 2 and writes nothing. Without --agent, init always keeps the Cursor rule
|
|
253
|
+
(the previous default) and adds every agent detected from the environment of
|
|
254
|
+
the calling agent or from project files (CLAUDE.md or .claude,
|
|
255
|
+
.github/instructions or .github/copilot-instructions.md, .windsurf,
|
|
256
|
+
.windsurfrules or .devin/rules, GEMINI.md or .gemini, .clinerules or .cline,
|
|
257
|
+
.cursor or .cursorrules), and prints a hint about --agent. With nothing
|
|
258
|
+
detected it writes the same files as before. Agent files already recorded in
|
|
259
|
+
.werewolf/managed.json and existing Werewolf blocks keep updating on every run,
|
|
260
|
+
even when their agent is not selected.
|
|
261
|
+
|
|
262
|
+
| Id | Files besides AGENTS.md |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `claude` | Managed block with `@AGENTS.md` in CLAUDE.md (skipped when CLAUDE.md already has that line), `.claude/skills/werewolf-design/SKILL.md` |
|
|
265
|
+
| `copilot` | `.github/instructions/werewolf.instructions.md` (`applyTo: "**"`). `.github/copilot-instructions.md` is never touched. |
|
|
266
|
+
| `windsurf` | `.windsurf/rules/werewolf.md` (`trigger: always_on`), or `.devin/rules/werewolf.md` when `.devin/` exists |
|
|
267
|
+
| `gemini` | Managed block with `@./AGENTS.md` in GEMINI.md. If `context.fileName` is set in `.gemini/settings.json`, keep GEMINI.md or AGENTS.md in it. |
|
|
268
|
+
| `cline` | `.clinerules/werewolf.md` |
|
|
269
|
+
| `cursor` | `.cursor/rules/werewolf.mdc` (`alwaysApply: true`) |
|
|
270
|
+
| `codex`, `jules`, `amp`, `other` | None; they read AGENTS.md |
|
|
271
|
+
|
|
272
|
+
Generated agent files use the ownership record like other generated files.
|
|
273
|
+
Init never creates symlinks and never deletes files of agents that are not
|
|
274
|
+
selected. --json reports `data.agents` (selected ids, the source `flag`, `env`,
|
|
275
|
+
`marker` or `default`, and the detected signals with their confidence),
|
|
276
|
+
`files` with the action `created`, `updated` or `unchanged`, `conflicts`,
|
|
277
|
+
`hints`, `changedFiles` and `skippedFiles`. A conflict exits non-zero, lists
|
|
278
|
+
every path in the diagnostic details and writes nothing.
|
|
279
|
+
|
|
280
|
+
Environment signals, each confirmed in official docs or the tool's source:
|
|
281
|
+
`CLAUDE_CODE_CHILD_SESSION` or `CLAUDECODE` (claude), `CURSOR_AGENT` (cursor),
|
|
282
|
+
`GEMINI_CLI` (gemini), `CODEX_THREAD_ID` or `CODEX_SESSION_ID` (codex),
|
|
283
|
+
`CLINE_ACTIVE=true` (cline) and `AI_AGENT=github_copilot_vscode_agent`
|
|
284
|
+
(copilot in VS Code). Other agents are
|
|
285
|
+
detected only through project files or --agent. `--agent other` writes
|
|
286
|
+
AGENTS.md and the skill only.
|
|
287
|
+
|
|
288
|
+
Prompt for a coding agent:
|
|
289
|
+
|
|
290
|
+
```text
|
|
291
|
+
Set up the Werewolf UI design rules in this project.
|
|
292
|
+
Pick your own id from: claude, cursor, copilot, windsurf, gemini, cline, codex, jules, amp, other.
|
|
293
|
+
Run in the project root: npx werewolf-ui@latest init --agent <your-id> --yes --json
|
|
294
|
+
Do not add --overwrite. If the command reports conflicts, stop and show them to me.
|
|
295
|
+
Then tell me which files were created, updated or left unchanged, using the JSON output.
|
|
296
|
+
```
|
|
297
|
+
|
|
249
298
|
The ownership record .werewolf/managed.json stores version 1 SHA-256 hashes of
|
|
250
299
|
managed generated files. Keep it with the generated files. Identical files skip;
|
|
251
300
|
unmodified recorded files can update when the seed or packaged rules change.
|
|
@@ -282,7 +331,7 @@ B3 add requires an initialized app. Missing config, seed or ownership record ret
|
|
|
282
331
|
WW_NOT_INITIALIZED with the npx werewolf-ui init action. It resolves one or more
|
|
283
332
|
component names and their registry dependencies in topological order, once per
|
|
284
333
|
item. Utility and token registry items are local files, never external packages.
|
|
285
|
-
Component APIs remain draft. C3 lint and D2 MCP launch ship on main
|
|
334
|
+
Component APIs remain draft. C3 lint and D2 MCP launch ship on main and in the published alpha.
|
|
286
335
|
|
|
287
336
|
Add maps UI, lib and hooks source into the configured compiler aliases and
|
|
288
337
|
directories. It parses source and edits only module specifiers under the known
|
|
@@ -333,7 +382,7 @@ checks to real installers and browser behavior in both supported layouts.
|
|
|
333
382
|
|
|
334
383
|
B4 theme requires an initialized consumer app and at least one of --accent,
|
|
335
384
|
--gray-tint or --radius-base. Accent is a 3 or 6 digit hex, gray tint is a finite
|
|
336
|
-
number from 0 to 1, and radius is sharp, default, pill or a non-negative px value.
|
|
385
|
+
number from 0 to 1, and radius is sharp, default, round, pill or a non-negative px value.
|
|
337
386
|
Use --cwd to select the consumer root. Stored config supplies the seed and output
|
|
338
387
|
paths; output must be a generated .css file. It never writes the repository seed.
|
|
339
388
|
|
|
@@ -357,14 +406,14 @@ agent instructions, ownership records and components cannot be selected by theme
|
|
|
357
406
|
seed and CSS. An edited component also conflicts when it is a dependency of a
|
|
358
407
|
requested component.
|
|
359
408
|
|
|
360
|
-
To build and install a local tarball
|
|
409
|
+
To try unreleased changes, build and install a local tarball:
|
|
361
410
|
|
|
362
411
|
```bash
|
|
363
412
|
npm ci
|
|
364
413
|
npm run build:cli
|
|
365
414
|
npm pack --workspace werewolf-ui --pack-destination /absolute/path/to/output
|
|
366
415
|
cd /absolute/path/to/consumer
|
|
367
|
-
npm install /absolute/path/to/output/werewolf-ui-0.1.0-alpha.
|
|
416
|
+
npm install /absolute/path/to/output/werewolf-ui-0.1.0-alpha.1.tgz --engine-strict
|
|
368
417
|
```
|
|
369
418
|
|
|
370
419
|
The supported alpha layouts are Next.js app-router (app or src/app) and Vite React
|
|
@@ -386,13 +435,13 @@ apps and processes are cleaned up. This network/browser gate runs separately
|
|
|
386
435
|
from npm test. The prior acceptance entry delegates to the same gate.
|
|
387
436
|
See [release checks and publication handoff](../../docs/release.md).
|
|
388
437
|
|
|
389
|
-
|
|
438
|
+
MIT License. See [LICENSE](LICENSE). Bundled third-party notices ship in `dist/THIRD-PARTY-NOTICES.txt`.
|
|
390
439
|
|
|
391
440
|
## MCP stdio launch
|
|
392
441
|
|
|
393
|
-
|
|
442
|
+
Run `npx werewolf-ui mcp --cwd ./my-app`. The default root is the current directory. Any existing directory is sufficient; init and framework detection are not required. The command accepts --yes and --json, but stdout always contains protocol traffic. Startup failures use stderr and exit codes.
|
|
394
443
|
|
|
395
|
-
|
|
444
|
+
To launch the published package without installing it in the app, use the version-pinned entry in [docs/mcp.md](../../docs/mcp.md). For a package installed in the app, configure this process entry in a compatible client's MCP settings. Replace both paths with the existing directory where the package is installed:
|
|
396
445
|
|
|
397
446
|
```json
|
|
398
447
|
{
|