@plune-ai/cli 0.34.5 → 0.35.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 CHANGED
@@ -128,6 +128,7 @@ the last resort, used only when `PLUNE_TOKEN` is set nowhere else. Nothing write
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
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 or a declared list could not be read (no file is written), `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
+ | `plune mcp conformance` | Check **any** MCP server against the protocol: a catalog of checks with their requirement level and spec section, a score from the `MUST` checks only, a frozen profile so a score means the same thing next month. `--list-checks` prints the catalog without connecting; `--fixture <file>` names the only tools a run may call. See the [CLI guide](docs/guide/cli.md#plune-mcp-conformance). |
131
132
  | `plune sync` | Upload the latest local run to the platform. Flags: `--file <path>` to send a specific run JSON, `--fail-on-failures` to read the run's summary back once after the upload and exit with [the gate](#a-release-gate---fail-on-failures)'s code. Each upload carries an `Idempotency-Key` (SHA-256 of the body), so sending the same run again returns the same run rather than creating a second one. Against a platform with `POST /v1/jobs` the upload is also reported as a job (kind `sync`, counting the run's rows) that ends completed, or failed with the error text if the sync fails; an older platform without the route is not told, and a job report never fails the sync: when the sync goes through, one the platform did not take is said in one line on stderr. |
132
133
  | `plune run import <file \| folder>` | Turn a **JUnit XML** or **Playwright JSON** report, a **k6 summary** or **Lighthouse JSON** report, a **folder of JUnit XML files** (Maven Surefire's `target/surefire-reports`, Gradle's `build/test-results/test`), or an **Allure `allure-results` folder**, into a run in Plune. Needs no provider key — nothing is generated. Flags: `--format junit\|playwright-json\|allure\|k6\|lighthouse` (detected when omitted: a folder with a `*-result.json` is Allure, any other folder is read as the JUnit `*.xml` files in it), `--name <text>` to call the run something other than the [folder-based default](#what-the-run-is-called), `--min-score <category>=<0-100>` (repeatable) for the score a [Lighthouse](#a-k6-summary-or-a-lighthouse-report) category needs to pass, `--key <externalKey>` to land several reports in one run (with `PLUNE_SHARED_RUN=1` — see below), `--create` to offer unmatched tests to the review queue, `--fail-on-missing-attachments` to exit 1 when a file a JUnit report names with `[[ATTACHMENT\|path]]`, or an Allure result names as a `source`, is not there (the results are sent either way), `--upload-concurrency <n>` for files uploaded at once ([1 to 32, default 16](#many-screenshots-upload-concurrency-and-retries)), `--fail-on-failures` to exit with [the gate](#a-release-gate---fail-on-failures)'s code on the summary the platform froze when this import finished the run. |
133
134
  | `plune run start` | Open a platform run — or join the one already carrying `--key` — and print its id. Flags: `--key <externalKey>` (generated when absent), `--name <text>` to call the run something other than the [default](#what-the-run-is-called), `--json` for one machine-readable line. |
@@ -232,6 +233,7 @@ code is then the platform's verdict on the run, not the runner's: the summary th
232
233
  | an expected case that never reported (`notRun`): a dead shard is not green | `1` |
233
234
  | only `passed`, `blocked`, `skipped` and muted failures | `0` |
234
235
  | no verdict: the platform could not be reached, the finish was refused, the run was left open or terminated | `1` |
236
+ | no result reached the run and nothing was expected of it: `run import` of a report whose cases the project does not have yet, `run finish` or `sync` of an empty run | `1` |
235
237
  | `run exec` where no result reached the run and nothing was expected of it | the command's own code |
236
238
 
237
239
  Without the flag every command exits as it always did. `plune run` (local evals) is not affected: it stays the
@@ -632,11 +634,15 @@ useful for a self-hosted backend. The Markdown format `pull` writes and `push` r
632
634
  ### Plune tools for AI agents: `plune mcp`
633
635
 
634
636
  `plune mcp serve` gives an agent the same Plune your token reaches — the review queue, cases,
635
- missions, questions, strategy, reports — as MCP tools over stdio. The agent sees at most 20 tools at
636
- once; the rest it finds with `plune_discover_tools`. Every write tool takes `dry_run`, batches stop at
637
- 100 items, and the agent is held to the platform's agent rules: a proposed case lands in the review
637
+ missions, questions, strategy, reports — as MCP tools over stdio. The agent is shown 17 tools, 8 with a
638
+ read token or `--read-only`; five more write tools it finds with `plune_discover_tools`. Every write
639
+ tool takes `dry_run`, batches stop at 100 items, and the agent is held to the platform's agent rules: a proposed case lands in the review
638
640
  queue, a bulk decision needs a confirm, and nothing is deleted through MCP.
639
641
 
642
+ The full guide is [Plune tools for AI agents](https://docs.plune.ai/cli/guides/mcp/): a project
643
+ `.mcp.json` and the Cursor file, the two protocol revisions the server speaks, how to keep the tool list
644
+ small, and what the contract tests check (snapshot, lint, token budget) and what they do not.
645
+
640
646
  `plune_cases_generate` asks the project's AI for case proposals from pasted text (a requirement, a
641
647
  story, a ticket's text; 20 words to 12 000 characters, up to 12 proposals, 8 by default). It spends the
642
648
  project's AI budget, and its proposals wait in the review queue like any other until a person approves
@@ -671,7 +677,46 @@ per-request `_meta`. In the newer revision a client learns that `plune_discover_
671
677
  list through `subscriptions/listen`; `tools/list` is sent with `ttlMs: 0`, so a client that does not
672
678
  listen reads the current list every time.
673
679
 
674
- #### Is the server alive: `plune mcp check`
680
+ #### Dependencies
681
+
682
+ | Package | Version | License | Why |
683
+ |---|---|---|---|
684
+ | `@modelcontextprotocol/server` | 2.4.0 | Apache-2.0 | The MCP server and its stdio transport for `plune mcp serve`; it serves revision `2026-07-28` and the `initialize`-based revisions from one process. |
685
+
686
+ The version is pinned exactly, not with a range, on purpose: the 2.x line moves fast, and each update is taken
687
+ deliberately with the protocol tests run against it.
688
+
689
+ ## Test an MCP server
690
+
691
+ Four commands test **any** MCP server, yours or someone else's, started over stdio or reached over
692
+ HTTP. They need no Plune account and no model, and they do not talk to the Plune platform: each one
693
+ starts the server you name after `--`, or connects to the address you give with `--url`, and nothing
694
+ else. Everything after `--` runs as your user, so point them only at a server you would run yourself.
695
+
696
+ ```bash
697
+ npx -y @plune-ai/cli mcp check -- node dist/server.js # does it start and answer
698
+ npx -y @plune-ai/cli mcp lint -- node dist/server.js # what in its tools confuses a model
699
+ npx -y @plune-ai/cli mcp snapshot --out mcp-snapshot.json -- node dist/server.js # its contract, to commit
700
+ npx -y @plune-ai/cli mcp diff mcp-snapshot.json -- node dist/server.js # what changed, and what breaks
701
+ ```
702
+
703
+ | Exit | Meaning |
704
+ |------|---------|
705
+ | `0` | Nothing at the `--fail-on` level, and everything was measured. For `snapshot`: the file was written. |
706
+ | `1` | A finding (`lint`), a failed check or smoke call (`check`), or a change (`diff`) at the `--fail-on` level. `snapshot` has no `1`. |
707
+ | `2` | Nothing about the server is proven, and you can fix why: the command was not found or did not start, the server could not be reached or answered `401` or `403`, a file cannot be read, or a flag is wrong. |
708
+ | `3` | Nothing was measured: the server lists no tools, there is nothing to compare, or a check could not run. Not measured is not a pass. |
709
+
710
+ Each command's own table is in [the CLI reference](docs/guide/cli.md#plune-mcp-check). The guides on
711
+ docs.plune.ai walk through a sample server with three defects, every lint rule with an example, the
712
+ exceptions file, snapshots in a pull request, and the run in Plune through JUnit:
713
+
714
+ - [Test an MCP server](https://docs.plune.ai/cli/guides/mcp-test-a-server/): the four commands, the exit codes and states, stdio and HTTP, `plune run import`;
715
+ - [Lint an MCP server](https://docs.plune.ai/cli/guides/mcp-lint/): the rules, `--fail-on`, `plune-mcp-ignore.yaml`, `--call`;
716
+ - [Snapshot and diff an MCP server](https://docs.plune.ai/cli/guides/mcp-snapshot-diff/): what a change costs a client, and the security signal;
717
+ - [MCP server checks in CI](https://docs.plune.ai/eval-action/recipes/mcp-in-ci/): `plune-ai/eval-action/mcp@v1` for a stdio or an HTTP server.
718
+
719
+ ### Is the server alive: `plune mcp check`
675
720
 
676
721
  `plune mcp check` answers the question before any other: does the server start, finish the
677
722
  handshake and answer the basic requests? It runs the checks in order (`start`, `initialize`,
@@ -693,7 +738,7 @@ be measured. `--out` writes a report you can attach to a ticket: no URL, command
693
738
  header in it, the server's stderr masked. The states, the options and the exit codes are in
694
739
  [the CLI reference](docs/guide/cli.md#plune-mcp-check).
695
740
 
696
- #### Checking any MCP server: `plune mcp lint`
741
+ ### Checking any MCP server: `plune mcp lint`
697
742
 
698
743
  `plune mcp lint` reads the whole tool list of a server you name, stdio or HTTP, and reports what
699
744
  makes a model choose the wrong tool: missing descriptions, look-alike tools, a string where an `enum`
@@ -711,7 +756,7 @@ It exits `1` on a finding at `--fail-on` (`error` by default; heuristic advice i
711
756
  a clean one. Accepted findings go in `plune-mcp-ignore.yaml`, each with a reason. The options, the
712
757
  file's format and the exit codes are in [the CLI reference](docs/guide/cli.md#plune-mcp-lint).
713
758
 
714
- #### Contract snapshots: `plune mcp snapshot` and `plune mcp diff`
759
+ ### Contract snapshots: `plune mcp snapshot` and `plune mcp diff`
715
760
 
716
761
  A server's author rarely notices a contract change — a removed tool, a parameter that became
717
762
  required, a rewritten description — and clients break later, quietly. `plune mcp snapshot` writes
@@ -730,15 +775,6 @@ destructive, and a new tool that does not say it is read-only carry a `security`
730
775
  for a reviewer to look, not a failure by itself. The format, the rules and the exit codes are in
731
776
  [the CLI reference](docs/guide/cli.md#plune-mcp-snapshot).
732
777
 
733
- #### Dependencies
734
-
735
- | Package | Version | License | Why |
736
- |---|---|---|---|
737
- | `@modelcontextprotocol/server` | 2.4.0 | Apache-2.0 | The MCP server and its stdio transport for `plune mcp serve`; it serves revision `2026-07-28` and the `initialize`-based revisions from one process. |
738
-
739
- The version is pinned exactly, not with a range, on purpose: the 2.x line moves fast, and each update is taken
740
- deliberately with the protocol tests run against it.
741
-
742
778
  ## Programmatic API
743
779
 
744
780
  The same engine that powers `plune run` is exported for use from your own code. Unlike the