@plune-ai/cli 0.34.4 → 0.34.5

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
@@ -124,6 +124,10 @@ the last resort, used only when `PLUNE_TOKEN` is set nowhere else. Nothing write
124
124
  | `plune login` | Save a [Plune platform](https://plune.ai/platform) API token so `sync` and `ingest` can reach it. The token is **checked against the API before it is saved**, so a wrong one fails here rather than two commands later. Get one at `https://beta.plune.ai` → Account → API tokens. Flags: `--token <token>` (omit to paste it or pipe it via stdin), `--skip-verify` (save without checking, for offline setup). In CI, skip this step: every platform command reads `PLUNE_TOKEN` from the environment first, and the saved login only when it is not set. |
125
125
  | `plune logout` | Remove the saved token. |
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
+ | `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
+ | `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 or a declared list could not be read (no file is written), `3` the server lists nothing. |
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. |
127
131
  | `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. |
128
132
  | `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. |
129
133
  | `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. |
@@ -661,6 +665,80 @@ The server reads the token the way every platform command does: `PLUNE_TOKEN` fr
661
665
  (set it in the client's `env` block), else the login `plune login` saved. A read token, or
662
666
  `--read-only`, offers only the read tools.
663
667
 
668
+ The server speaks both MCP protocol eras: a client that opens with `initialize` (revision
669
+ `2025-11-25` and earlier) and a client on revision `2026-07-28` that sends `server/discover` and
670
+ per-request `_meta`. In the newer revision a client learns that `plune_discover_tools` changed the
671
+ list through `subscriptions/listen`; `tools/list` is sent with `ttlMs: 0`, so a client that does not
672
+ listen reads the current list every time.
673
+
674
+ #### Is the server alive: `plune mcp check`
675
+
676
+ `plune mcp check` answers the question before any other: does the server start, finish the
677
+ handshake and answer the basic requests? It runs the checks in order (`start`, `initialize`,
678
+ `protocol-version`, `capabilities`, `tools-list`, `resources-list`, `resource-templates-list`,
679
+ `prompts-list`, `ping`), each with a state and one sentence on what it saw. A list the server did not
680
+ declare is `not-applicable`; a check with no answer within `--check-timeout` is `could-not-run`,
681
+ never a pass.
682
+
683
+ ```bash
684
+ plune mcp check -- node dist/server.js
685
+ plune mcp check --url http://127.0.0.1:3000/mcp --wait 20s
686
+ plune mcp check --smoke --out check.json -- node dist/server.js
687
+ ```
688
+
689
+ `--smoke` also calls the tools that say they are read-only, do not say they are destructive and need
690
+ no argument, with `{}`; `--allow-write-calls` adds only tools that say `destructiveHint: false`. It exits `0` when everything that applies passed, `1` on a failure, `2` when
691
+ the server did not start, could not be reached or wants credentials, and `3` when something could not
692
+ be measured. `--out` writes a report you can attach to a ticket: no URL, command, environment or
693
+ header in it, the server's stderr masked. The states, the options and the exit codes are in
694
+ [the CLI reference](docs/guide/cli.md#plune-mcp-check).
695
+
696
+ #### Checking any MCP server: `plune mcp lint`
697
+
698
+ `plune mcp lint` reads the whole tool list of a server you name, stdio or HTTP, and reports what
699
+ makes a model choose the wrong tool: missing descriptions, look-alike tools, a string where an `enum`
700
+ belongs, a list that costs too much context, schemas that break the specification. Every finding
701
+ has a stable rule id, a level and a line on how to fix it; `--list-rules` prints the catalog.
702
+
703
+ ```bash
704
+ plune mcp lint -- node dist/server.js
705
+ plune mcp lint --url https://example.com/mcp --header-env "Authorization=MCP_AUTH"
706
+ plune mcp lint --call --format json -- node dist/server.js > lint.json
707
+ ```
708
+
709
+ It exits `1` on a finding at `--fail-on` (`error` by default; heuristic advice is `warn` at most),
710
+ `2` when the server does not start, and `3` when nothing was measured — a server with no tools is not
711
+ a clean one. Accepted findings go in `plune-mcp-ignore.yaml`, each with a reason. The options, the
712
+ file's format and the exit codes are in [the CLI reference](docs/guide/cli.md#plune-mcp-lint).
713
+
714
+ #### Contract snapshots: `plune mcp snapshot` and `plune mcp diff`
715
+
716
+ A server's author rarely notices a contract change — a removed tool, a parameter that became
717
+ required, a rewritten description — and clients break later, quietly. `plune mcp snapshot` writes
718
+ the contract as JSON that is the same byte for byte for the same server (sorted keys and entities,
719
+ LF line endings, no time, no command, no URL, no header, secrets masked), so it can live in the
720
+ repository; `plune mcp diff` compares it with a pull request's build and classifies every change.
721
+
722
+ ```bash
723
+ plune mcp snapshot --out mcp-snapshot.json -- node dist/server.js
724
+ plune mcp diff mcp-snapshot.json -- node dist/server.js
725
+ plune mcp diff mcp-snapshot.json current.json --format markdown > comment.md
726
+ ```
727
+
728
+ A changed description, changed instructions, a tool that stops being read-only or becomes
729
+ destructive, and a new tool that does not say it is read-only carry a `security` signal: a reason
730
+ for a reviewer to look, not a failure by itself. The format, the rules and the exit codes are in
731
+ [the CLI reference](docs/guide/cli.md#plune-mcp-snapshot).
732
+
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
+
664
742
  ## Programmatic API
665
743
 
666
744
  The same engine that powers `plune run` is exported for use from your own code. Unlike the
@@ -0,0 +1,41 @@
1
+ Third-party notices for @plune-ai/cli
2
+
3
+ This package contains work derived from the projects below. Each entry names the
4
+ project, its author, its licence, its copyright notice and what was reworked.
5
+
6
+ --------------------------------------------------------------------------------
7
+
8
+ mcp-master-tester
9
+ https://github.com/simplymanas/mcp-master-tester (commit 85f0c95)
10
+ Author: Manas Dash
11
+ Licence: MIT
12
+
13
+ What was reworked: the MCP tool lint rules in src/mcp-testing/lint/ take their
14
+ rule groups from public/lint.js of this project (specification checks, confusable
15
+ tools, descriptions, parameters, size of the tool list, naming style), its idea of
16
+ naming the largest tool when the list is too big, its error/warn/info levels and
17
+ its characters-per-token size estimate. The code, the thresholds table, the
18
+ Ukrainian word lists, the rule ids and the tests were written anew; no code was
19
+ copied.
20
+
21
+ MIT License
22
+
23
+ Copyright (c) 2026 Manas Dash
24
+
25
+ Permission is hereby granted, free of charge, to any person obtaining a copy
26
+ of this software and associated documentation files (the "Software"), to deal
27
+ in the Software without restriction, including without limitation the rights
28
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ copies of the Software, and to permit persons to whom the Software is
30
+ furnished to do so, subject to the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be included in all
33
+ copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
+ SOFTWARE.