@andrii_kremlovskyi/playwright-traces-reader 2.3.0 → 2.5.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 +42 -7
- package/dist/cli/formatters.d.ts +3 -1
- package/dist/cli/formatters.d.ts.map +1 -1
- package/dist/cli/formatters.js +21 -1
- package/dist/cli/formatters.js.map +1 -1
- package/dist/cli/helpers.d.ts +2 -0
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/helpers.js +28 -1
- package/dist/cli/helpers.js.map +1 -1
- package/dist/cli/json.d.ts +16 -2
- package/dist/cli/json.d.ts.map +1 -1
- package/dist/cli/json.js +18 -0
- package/dist/cli/json.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +23 -0
- package/dist/cli.js.map +1 -1
- package/dist/docGenerator/actionTranslator.d.ts +15 -0
- package/dist/docGenerator/actionTranslator.d.ts.map +1 -0
- package/dist/docGenerator/actionTranslator.js +299 -0
- package/dist/docGenerator/actionTranslator.js.map +1 -0
- package/dist/docGenerator/copilotRenderer.d.ts +17 -0
- package/dist/docGenerator/copilotRenderer.d.ts.map +1 -0
- package/dist/docGenerator/copilotRenderer.js +247 -0
- package/dist/docGenerator/copilotRenderer.js.map +1 -0
- package/dist/docGenerator/featureLinker.d.ts +12 -0
- package/dist/docGenerator/featureLinker.d.ts.map +1 -0
- package/dist/docGenerator/featureLinker.js +117 -0
- package/dist/docGenerator/featureLinker.js.map +1 -0
- package/dist/docGenerator/index.d.ts +7 -0
- package/dist/docGenerator/index.d.ts.map +1 -0
- package/dist/docGenerator/index.js +19 -0
- package/dist/docGenerator/index.js.map +1 -0
- package/dist/docGenerator/markdownRenderer.d.ts +19 -0
- package/dist/docGenerator/markdownRenderer.d.ts.map +1 -0
- package/dist/docGenerator/markdownRenderer.js +214 -0
- package/dist/docGenerator/markdownRenderer.js.map +1 -0
- package/dist/docGenerator/types.d.ts +97 -0
- package/dist/docGenerator/types.d.ts.map +1 -0
- package/dist/docGenerator/types.js +3 -0
- package/dist/docGenerator/types.js.map +1 -0
- package/dist/docGenerator/vaultBuilder.d.ts +20 -0
- package/dist/docGenerator/vaultBuilder.d.ts.map +1 -0
- package/dist/docGenerator/vaultBuilder.js +437 -0
- package/dist/docGenerator/vaultBuilder.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/parseTrace.d.ts +22 -0
- package/dist/parseTrace.d.ts.map +1 -1
- package/dist/parseTrace.js +66 -0
- package/dist/parseTrace.js.map +1 -1
- package/package.json +3 -3
- package/templates/skills/analyze-playwright-traces/SKILL.md +68 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrii_kremlovskyi/playwright-traces-reader",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Parse Playwright trace files into structured data for AI agents and tooling",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"ts-jest",
|
|
57
57
|
{
|
|
58
58
|
"tsconfig": {
|
|
59
|
-
"module": "
|
|
60
|
-
"moduleResolution": "
|
|
59
|
+
"module": "Node16",
|
|
60
|
+
"moduleResolution": "Node16",
|
|
61
61
|
"esModuleInterop": true,
|
|
62
62
|
"types": [
|
|
63
63
|
"node",
|
|
@@ -113,6 +113,35 @@ npx playwright-traces-reader failures <reportRootPath>
|
|
|
113
113
|
npx playwright-traces-reader summary <tracePath>
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
### Vault analysis files
|
|
117
|
+
|
|
118
|
+
Reports may have an associated markdown analysis file stored in the dashboard vault. When `search-reports` or `prepare-report` returns a report descriptor, the `analysisFile` field indicates whether a vault `.md` file exists for that report. If `analysisFile` is `null`, no analysis file is available.
|
|
119
|
+
|
|
120
|
+
Use `vault-read` to retrieve the content of an analysis file by name:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx playwright-traces-reader vault-read <analysisFile>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- `--base-url <url>` points to the local `playwright-reports` hub. Default: `http://127.0.0.1:9333`.
|
|
127
|
+
- `-f, --format <format>` controls output format: `json` or `text` (default: `text`).
|
|
128
|
+
|
|
129
|
+
Text format outputs the raw markdown content directly. JSON format wraps it in an envelope:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{ "schemaVersion": 1, "command": "vault-read", "filename": "...", "content": "..." }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Typical flow: discover a report, then read its analysis file if one exists.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx playwright-traces-reader search-reports "UAT EU" --latest --limit 1
|
|
139
|
+
# → check analysisFile field in the response
|
|
140
|
+
npx playwright-traces-reader vault-read <analysisFile>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The agent cannot access vault files directly with `read_file` because they are stored outside the workspace. Always use `vault-read` through the terminal to retrieve vault content.
|
|
144
|
+
|
|
116
145
|
### Report-level analysis
|
|
117
146
|
|
|
118
147
|
Use `failures` when the user wants all unique failing tests in a report.
|
|
@@ -136,6 +165,38 @@ What it returns:
|
|
|
136
165
|
- repeated failing-request and repeated correlated-issue patterns across unique non-skipped failures
|
|
137
166
|
- enough information to follow up with `summary <tracePath>` for one selected failure
|
|
138
167
|
|
|
168
|
+
### Finding traces for any test
|
|
169
|
+
|
|
170
|
+
Use `find-traces` when the user wants to locate trace paths for a specific test — including passed tests — by name.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx playwright-traces-reader find-traces /path/to/playwright-report "test name pattern"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The `<grep>` argument is a case-insensitive substring matched against the full test title (file path + describe blocks + test name). Special characters in test names (brackets, quotes, parentheses, non-Latin scripts) are handled safely — paste any fragment directly.
|
|
177
|
+
|
|
178
|
+
Use `--outcome` to filter by test outcome:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx playwright-traces-reader find-traces /path/to/playwright-report "checkout" --outcome expected
|
|
182
|
+
npx playwright-traces-reader find-traces /path/to/playwright-report "checkout" --outcome flaky
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Outcome values: `expected` (passed), `unexpected` (failed), `flaky`, `skipped`.
|
|
186
|
+
|
|
187
|
+
What it returns:
|
|
188
|
+
|
|
189
|
+
- all matching tests with their trace paths, including all retries
|
|
190
|
+
- test-level outcome from `report.json`
|
|
191
|
+
- trace SHA1 and absolute trace path for direct use with `summary <tracePath>`
|
|
192
|
+
|
|
193
|
+
Typical follow-up:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npx playwright-traces-reader find-traces /path/to/playwright-report "login" --outcome expected
|
|
197
|
+
npx playwright-traces-reader summary <tracePath> --report /path/to/playwright-report
|
|
198
|
+
```
|
|
199
|
+
|
|
139
200
|
### Single-trace summary
|
|
140
201
|
|
|
141
202
|
Use `summary` when the user wants one complete summary for a specific trace.
|
|
@@ -299,15 +360,15 @@ npx playwright-traces-reader init-skills
|
|
|
299
360
|
1. If the user gave no report identifier at all, start with the local `playwright-report/` directory.
|
|
300
361
|
2. If the report path is unknown but the user did provide metadata, date, or recency hints, use `search-reports` and then `prepare-report` first.
|
|
301
362
|
3. Identify whether the task is report-level or single-trace.
|
|
302
|
-
4.
|
|
303
|
-
5.
|
|
304
|
-
6. Use
|
|
305
|
-
7.
|
|
363
|
+
4. If the user wants to analyze a specific test by name (including passed tests), use `find-traces` to locate its trace path first.
|
|
364
|
+
5. Choose the narrowest parser command that answers the question.
|
|
365
|
+
6. Use the default JSON output for agent reasoning or follow-up processing.
|
|
366
|
+
7. Use `--format text` when the user wants a direct terminal-style summary.
|
|
367
|
+
8. Do not fall back to library APIs unless the requested workflow is not covered by a supported command.
|
|
306
368
|
|
|
307
369
|
## Output Guidance
|
|
308
370
|
|
|
309
371
|
- All CLI JSON outputs use versioned envelopes.
|
|
310
|
-
- See `CLI_JSON_CONTRACTS.md` in the package for payload structure.
|
|
311
372
|
- For screenshots, the JSON output contains file metadata, not image understanding.
|
|
312
373
|
|
|
313
374
|
## Example Prompts This Skill Covers
|
|
@@ -317,8 +378,5 @@ npx playwright-traces-reader init-skills
|
|
|
317
378
|
- Find checkout reports from `2026-04-01` through `2026-04-03` and prepare the newest one.
|
|
318
379
|
- Resolve this `reportRef` and summarize the failing trace.
|
|
319
380
|
- Use the reports hub at `http://127.0.0.1:9333` to find the most recent smoke run.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
- Use the CLI reference for detailed command docs: `CLI_REFERENCE.md`
|
|
324
|
-
- Use the library integration guide only for in-process integrations such as `playwright-reports`: `LIBRARY_INTEGRATION.md`
|
|
381
|
+
- Find the trace for my passed "login" test and show me its summary.
|
|
382
|
+
- Show me traces for all flaky tests matching "checkout".
|