@plune-ai/cli 0.38.0 → 0.39.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/README.md +10 -10
- package/dist/cli.cjs +882 -349
- package/dist/index.cjs +1067 -59
- package/dist/index.d.cts +29 -8
- package/dist/index.d.ts +29 -8
- package/dist/index.js +1067 -59
- package/dist/mcp-tools.cjs +10 -10
- package/dist/mcp-tools.d.cts +7 -7
- package/dist/mcp-tools.d.ts +7 -7
- package/dist/mcp-tools.js +10 -10
- package/dist/reporter-core.cjs +265 -237
- package/dist/reporter-core.d.cts +111 -112
- package/dist/reporter-core.d.ts +111 -112
- package/dist/reporter-core.js +265 -237
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env
|
|
|
42
42
|
|
|
43
43
|
# 3. Run the assertions
|
|
44
44
|
plune run
|
|
45
|
-
# →
|
|
45
|
+
# → 3 passed · 0 failed · 0 errored · 3 total · $0.0008 · 1840ms
|
|
46
46
|
|
|
47
47
|
# 4. Re-render the last run, or diff two runs to catch regressions
|
|
48
48
|
plune report --format markdown
|
|
@@ -126,7 +126,7 @@ the last resort, used only when `PLUNE_TOKEN` is set nowhere else. Nothing write
|
|
|
126
126
|
| `plune mcp serve` | Serve the Plune tools to an AI agent (Claude Code, Codex, any MCP client) over **MCP stdio**. See [Plune tools for AI agents](#plune-tools-for-ai-agents-plune-mcp). Flags: `--project <id>` (default `PLUNE_PROJECT`), `--read-only` (offer only the read tools). |
|
|
127
127
|
| `plune mcp check` | Check that **any** MCP server starts and answers: handshake, protocol version, capabilities, the lists, `ping`. See [Is the server alive](#is-the-server-alive-plune-mcp-check). Flags: `--check-timeout <duration>`, `--wait <duration>`, `--smoke` (with `--smoke-limit`, `--smoke-timeout`, `--budget`, `--allow-write-calls`), `--out [<format>=]<path>` (repeatable), `--reporter junit-xml`, `--format human\|json\|github\|markdown`, and the connection flags. Exit `0` healthy, `1` a check failed, `2` the server did not start, could not be reached or wants credentials, or a flag is wrong, `3` something could not be measured. |
|
|
128
128
|
| `plune mcp lint` | Check the tool list of **any** MCP server for what confuses a model — no account, no model. See [Checking any MCP server](#checking-any-mcp-server-plune-mcp-lint). Flags: `--fail-on error\|warn\|info\|never`, `--show-info`, `--format human\|json\|github\|markdown`, `--reporter junit-xml`, `--out [<format>=]<path>`, `--ignore-file <path>`, `--list-rules`, `--call`, `--call-limit <n>`, `--call-timeout <duration>`, and the connection flags (`--url`, `--header-env`, `--env`, …). Exit `0` clean, `1` findings, `2` the server did not start or a flag is wrong, `3` nothing measured. |
|
|
129
|
-
| `plune mcp snapshot` | Write the contract of **any** MCP server — tools, resources, resource templates, prompts, capabilities, instructions — as one stable JSON file to commit. See [Contract snapshots](#contract-snapshots-plune-mcp-snapshot-and-plune-mcp-diff). Flags: `--out <path>` (default stdout) and the connection flags. Exit `0` written, `2` the server did not start
|
|
129
|
+
| `plune mcp snapshot` | Write the contract of **any** MCP server — tools, resources, resource templates, prompts, capabilities, instructions — as one stable JSON file to commit. See [Contract snapshots](#contract-snapshots-plune-mcp-snapshot-and-plune-mcp-diff). Flags: `--out <path>` (default stdout), `--push` with `--server <id>` or `--server-name <name>` and optional `--environment <text>` (send it to the platform's MCP catalog; nothing is sent without `--push`), and the connection flags. Exit `0` written (or sent), `1` with `--push` the platform could not be reached (the snapshot is kept in a file), `2` the server did not start, a declared list could not be read, or the platform refused the push (login, body, quota), `3` the server lists nothing. |
|
|
130
130
|
| `plune mcp diff` | Compare a snapshot with another snapshot file or a live server: every change `breaking`, `non-breaking` or `informational`, with a reason. See [Contract snapshots](#contract-snapshots-plune-mcp-snapshot-and-plune-mcp-diff). Flags: `--fail-on breaking\|any\|none`, `--format human\|json\|github\|markdown`, `--reporter junit-xml`, `--out [<format>=]<path>`, and the connection flags. All three write [JSON, JUnit XML for `plune run import`, GitHub annotations and a pull request comment](docs/guide/cli.md#report-formats-of-plune-mcp-lint-check-and-diff) from one run. Exit `0` nothing at `--fail-on`, `1` a change at it, `2` a file cannot be read or the server did not start, `3` nothing to compare. |
|
|
131
131
|
| `plune mcp pin` | Pin the tools, prompts and resource templates of **any** MCP server in `plune-mcp.lock.json` after reading them in full, and check a live server against it in CI. See [Pinning approved tools](#pinning-approved-tools-plune-mcp-pin). Flags: `--check`, `--stability` (with `--times`, `--pause`, `--wait`), `--yes`, `--lock <path>`, `--name <label>`, `--format human\|json`, and the connection flags. `--check` exits `0` as pinned, `1` a difference, `2` a usage error, `3` nothing compared (the server could not be reached). |
|
|
132
132
|
| `plune mcp scan` | Scan what a model or a person cannot see in **any** MCP server, sending no probe unless `--active` asks for the declared ones (see the CLI guide): descriptions (hidden Unicode, override phrases), a pin file, client configuration (`.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`: secrets, plain http, shell launchers) and tool names across servers. See the [CLI guide](docs/guide/cli.md#plune-mcp-scan). Flags: `--snapshot [label=]file`, `--config <file>`, `--client claude-code\|cursor\|vscode`, `--pin-file`, `--only`/`--skip`, `--active` with `--probes`, `--confirm-host`, `--max-calls`, `--max-requests`, `--token-env`, `--other-token-env`, `--fail-on error\|warn\|never`, `--gate-heuristics`, `--allow-partial`, `--ignore-file`, `--allow-long-exceptions`, `--format human\|json\|github\|sarif`, `--reporter junit-xml`, `--out`, and the connection flags. Exit `0` nothing that gates, `1` a finding at `--fail-on`, `2` a usage error, `3` something could not be measured. |
|
|
@@ -138,16 +138,16 @@ the last resort, used only when `PLUNE_TOKEN` is set nowhere else. Nothing write
|
|
|
138
138
|
| `plune run exec -- <command>` | Open a run, run the command inside it, close the run — and exit with whatever the command returned. Sets `PLUNE_SHARED_RUN` for you, so anything reporting inside joins that run. Flags: `--key <externalKey>`, `--name <text>` (as on `run start`), `--fail-on-failures` to exit with [the gate](#a-release-gate---fail-on-failures)'s code instead — or with the command's own when no result reached the run. |
|
|
139
139
|
| `plune run delete <id>` | Delete a run and everything it produced — its results and the review-queue entries it raised. Approved test cases and the audit log stay. **Recoverable for 30 days** (an owner of the project can put it back from Settings → Bin), then gone for good. No prompt: it is your data, and this command belongs in scripts. |
|
|
140
140
|
| `plune run report` | Replay `.plune/pending-results.jsonl` — send what the reporter could not. The lines of one reporter run go back as one run, with the commit and branch the reporter recorded. Once every result has gone the file is renamed to `pending-results.<time>.sent.jsonl`; if anything did not go, it stays as it was. Flags: `--file <path>`. |
|
|
141
|
-
| `plune ingest [dir]` | Record a [Cairn](https://github.com/plune-ai/cairn) run in Plune. Omit `[dir]` for the newest run under `./runs`, or name the directory holding `report.json`. Generated cases arrive as **review proposals** — nothing is created until a person approves it. Against a platform with `POST /v1/jobs` the ingest is also reported as a job (kind `ingest`, counting the cases sent, linked to the run it landed in) that ends completed, or failed with the error text if the ingest fails; as with `sync`, an older platform is not told and a job report never fails the ingest or changes its exit code. |
|
|
141
|
+
| `plune ingest [dir]` | Record a [Cairn](https://github.com/plune-ai/cairn) run in Plune. Omit `[dir]` for the newest run under `./runs`, or name the directory holding `report.json`. Generated cases arrive as **review proposals** — nothing is created until a person approves it. A run recorded with `--screencast` also sends each case's video and trace to its proposal (or to its result, for a case approved before), up to 100 MiB a file; a file that does not go is a line under the counters, never a failure. The ingest declares those recordings on each case first (title, chapters, and each file's run-relative path, kind and size, a file over 100 MiB included), so the proposal can show what each file became. Against a platform with `POST /v1/jobs` the ingest is also reported as a job (kind `ingest`, counting the cases sent, linked to the run it landed in) that ends completed, or failed with the error text if the ingest fails; as with `sync`, an older platform is not told and a job report never fails the ingest or changes its exit code. |
|
|
142
142
|
| `plune pull [file]` | Write the project's test cases as **one Markdown document** — Testomat's classical format, plus Plune's own columns — to `plune/cases.md` (or `[file]`). Refuses to overwrite a file git sees as modified; `--force` overrides, `--suite <id>` takes one suite or folder and what is under it. |
|
|
143
143
|
| `plune push [file] [--dry-run]` | Send the document back. Cases are matched by `id`; a block without one becomes a draft; an unknown id is refused by line; **nothing is deleted**. Prints the report — created, updated, unchanged, refused, warnings — and with `--dry-run` writes nothing. Exit `4` when anything was refused. |
|
|
144
|
-
| `plune requirements import <file.md>` | Import requirements from a **Markdown file** (an SRS, a PRD, a page exported from a wiki). With no mapping flags it lists the tables and sections the file has and exits `0`; with `--table` or `--sections` it is a **dry run** that writes nothing until you add `--yes`. See [Requirements from a Markdown file](#requirements-from-a-markdown-file). Needs a Plune platform that serves `POST /v1/projects/:id/requirements/import
|
|
145
|
-
| `plune requirements links <file.md>` | Import a **traceability matrix** (a Markdown table of requirement key to test) as links between requirements and cases. With no flags it lists the tables the file has and exits `0`; with `--table`, `--requirement-column` and `--test-column` it is a **dry run** that writes nothing until you add `--yes`. See [Links from a traceability matrix](#links-from-a-traceability-matrix). Needs a platform that serves `POST /v1/projects/:id/requirements/import/links
|
|
146
|
-
| `plune verify` | Compare the project's **automated cases** with the Playwright tests in the code, **read-only
|
|
147
|
-
| `plune ids [--write]` | Write the Plune **case id of each Playwright test that names none** into a mapfile, `plune/ids.json` (`{ "<path-title>": "<case id>" }`), instead of editing your test files
|
|
144
|
+
| `plune requirements import <file.md>` | Import requirements from a **Markdown file** (an SRS, a PRD, a page exported from a wiki). With no mapping flags it lists the tables and sections the file has and exits `0`; with `--table` or `--sections` it is a **dry run** that writes nothing until you add `--yes`. See [Requirements from a Markdown file](#requirements-from-a-markdown-file). Needs a Plune platform that serves `POST /v1/projects/:id/requirements/import`. |
|
|
145
|
+
| `plune requirements links <file.md>` | Import a **traceability matrix** (a Markdown table of requirement key to test) as links between requirements and cases. With no flags it lists the tables the file has and exits `0`; with `--table`, `--requirement-column` and `--test-column` it is a **dry run** that writes nothing until you add `--yes`. See [Links from a traceability matrix](#links-from-a-traceability-matrix). Needs a platform that serves `POST /v1/projects/:id/requirements/import/links`. |
|
|
146
|
+
| `plune verify` | Compare the project's **automated cases** with the Playwright tests in the code, **read-only**. Prints both sides: cases in Plune that the code no longer has (already `detached`, or one a full run would detach) and tests in the code that Plune has no case for. A test is matched by the id it names (`PluneId` annotation or `@P<id>` in its title), else by its `path-title` key. Nothing is written to Plune and no id is added to your source. Playwright only. Flags: `--from <file>` (a saved `playwright test --list --reporter=json`, instead of running Playwright), `--playwright-config <path>`, `--json`, `--fail-on-drift` (exit `1` when either side has something the other lacks). |
|
|
147
|
+
| `plune ids [--write]` | Write the Plune **case id of each Playwright test that names none** into a mapfile, `plune/ids.json` (`{ "<path-title>": "<case id>" }`), instead of editing your test files. A **dry run** unless `--write`: it prints what it would add. Only tests whose case Plune already holds get an entry (matched by the `path-title` key); a test with no case yet is listed and skipped. Idempotent: entries are only added, never overwritten or removed (an entry for a test no longer in the code is kept and listed), the file is sorted so diffs stay small, and nothing is written when nothing changes. A mapfile that is not a JSON object of strings is refused (exit `2`) and left as it is. Playwright only. The Playwright reporter reads the mapfile: an entry names the case after the `PluneId` annotation, `@P<id>` and a metadata attachment, and before the `playwright-id` and `path-title` keys, so a renamed test keeps its case when the entry is updated with `plune ids --write` (override the path with `PLUNE_IDS_FILE` or the reporter option `idsFile`). Flags: `--write`, `--file <path>` (default `plune/ids.json`), `--from <file>`, `--playwright-config <path>`, `--json`. Exit codes as `plune verify`. |
|
|
148
148
|
| `plune automate <caseId>` | Run [Cairn](https://github.com/plune-ai/cairn)'s `automate` on **one case from Plune** and print the code it wrote as a diff of new files (#148). Cairn runs in `--repo <dir>` (default: the current directory) with an environment that holds **no `PLUNE_*` variable and no token**, and reads a copy of that directory's `.env` without them. Nothing is written into the repo. With `--send`, the same files go to the **review queue** as an automation proposal (`POST /v1/review-items/automations`), the spec file's `test()` call named as the case's code; the bounds (10 files, 16 KB each, 64 KiB in all) are checked first, and the queue entry's id is printed, new or replacing the one waiting for the case. Flags: `--repo`, `--cairn <path>`, `--url <url>`, `--send`; arguments after `--` go to Cairn. See [the CLI reference](./docs/guide/cli.md#plune-automate). |
|
|
149
149
|
| `plune plan grep <id>` | Print a [test plan](https://docs.plune.ai/platform/plans/) as **one `--grep` pattern** — `npx playwright test --grep "$(plune plan grep <id>)"` or `npx vitest run -t "$(plune plan grep <id>)"` runs exactly what the plan collects. Each case contributes its title path from the `path-title` key the reporter wrote (the file left out, `[ >#]+` between the segments — a space for Playwright, jest, mocha and vitest ≤ 4, ` > ` for vitest 5), escaped, joined with `\|`; a case without one goes in by title. The pattern is all that reaches stdout; the summary — how many cases, how many keyed — goes to stderr. An empty plan prints `(?!)`, which matches nothing, because an empty `--grep` would run everything. |
|
|
150
|
-
| `plune run grep <run> [--failed]` | Print a run's **automated** cases as one `--grep` pattern, built the way `plan grep` builds a plan's — so the commands Plune shows for a run work as they are: `npx playwright test --grep "$(plune run grep <run-id> --failed)"` re-runs an automated run's failures where your tests run (Plune starts no CI), and `PLUNE_RUN=<key> npx playwright test --grep "$(plune run grep <key>)"` runs the automated half of a mixed run launched without a plan. `<run>` is the run's id (a UUID) or its key (`rk_` and ten hex); anything else is refused with exit `2` before anything is sent, and a key no run carries exits `1`. The cases are the ones the run expected — cases added on its page among them, run or not — or holds a result of; manual cases are left out. `--failed` keeps the cases whose latest result the platform counts as failed or broken, so a muted case's failure stays out, as from **Re-run N failed**. Only the pattern reaches stdout; how many cases were taken and how many left out goes to stderr; nothing taken prints `(?!)`. Needs a Plune that serves `GET /v1/runs/:id/cases
|
|
150
|
+
| `plune run grep <run> [--failed]` | Print a run's **automated** cases as one `--grep` pattern, built the way `plan grep` builds a plan's — so the commands Plune shows for a run work as they are: `npx playwright test --grep "$(plune run grep <run-id> --failed)"` re-runs an automated run's failures where your tests run (Plune starts no CI), and `PLUNE_RUN=<key> npx playwright test --grep "$(plune run grep <key>)"` runs the automated half of a mixed run launched without a plan. `<run>` is the run's id (a UUID) or its key (`rk_` and ten hex); anything else is refused with exit `2` before anything is sent, and a key no run carries exits `1`. The cases are the ones the run expected — cases added on its page among them, run or not — or holds a result of; manual cases are left out. `--failed` keeps the cases whose latest result the platform counts as failed or broken, so a muted case's failure stays out, as from **Re-run N failed**. Only the pattern reaches stdout; how many cases were taken and how many left out goes to stderr; nothing taken prints `(?!)`. Needs a Plune that serves `GET /v1/runs/:id/cases`. |
|
|
151
151
|
|
|
152
152
|
Global flags: `-c, --config <path>` · `-v, --verbose` · `--no-color`.
|
|
153
153
|
|
|
@@ -388,7 +388,7 @@ JUnit report is skipped with a line in the output. Each test arrives with its cl
|
|
|
388
388
|
(`cart.CartTest#addsAnItem` from Surefire; Gradle keeps the brackets, `cart.CartTest#addsAnItem()`), its status
|
|
389
389
|
(`pass`, `failure`, `error`, `skipped`), the failure's message, type and stack trace, and its duration. Gradle writes
|
|
390
390
|
a `timestamp` on the suite, and a test's span starts there; Surefire writes none, so a Maven test's span ends when the
|
|
391
|
-
import reads the report
|
|
391
|
+
import reads the report. A file reaches a test only
|
|
392
392
|
through a `[[ATTACHMENT|path]]` line in its own output, [as above](#files-from-a-junit-report), the path counted from
|
|
393
393
|
the folder the XML file is in. Gradle puts that output in the test's testcase only with
|
|
394
394
|
`reports.junitXml.outputPerTestCase = true` (by default it writes it once per suite).
|
|
@@ -521,7 +521,7 @@ The shard that is the Nth also prints `plune: run closed` just above that line,
|
|
|
521
521
|
#### A combination per job of a matrix: `PLUNE_CONFIGURATION`
|
|
522
522
|
|
|
523
523
|
The jobs of a matrix of browsers and systems report into one run, each under its own combination of
|
|
524
|
-
configuration values
|
|
524
|
+
configuration values:
|
|
525
525
|
|
|
526
526
|
```yaml
|
|
527
527
|
strategy:
|