@oprt/cli 0.3.0 → 0.4.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
@@ -31,11 +31,12 @@ into the file an agent reads on every turn: `AGENTS.md` by default, `CLAUDE.md`
31
31
  Running it again replaces only the block. `search` ranks components and recipes by need
32
32
  (`--limit` is a whole number from 1 to 50). `component` prints one component's props, what each
33
33
  option value is for, its nesting rules and its example. `check` reads `.tsx` and `.jsx` files with
34
- the project's own TypeScript (5 or 6; TypeScript 7 has no JavaScript syntax API to read with) and
35
- reports invalid option values, unknown exports, forbidden nesting, missing required props and breaks
36
- of the house rules. `doctor` says whether lookups and code checking can run here, one at a time,
37
- and why checking is blocked when it is. `mcp` serves the lookups and the check over the Model
38
- Context Protocol on stdin and stdout, with no dependencies.
34
+ a parser that ships inside this package (Babel's, in TypeScript and JSX mode), so it works in any
35
+ project: no TypeScript, or any version of it, is needed. It reports invalid option values, unknown
36
+ exports, forbidden nesting, missing required props and breaks of the house rules. `doctor` says
37
+ whether lookups and code checking can run here, one at a time, which parser checking reads with, and
38
+ why checking is blocked if the parser file is ever missing. `mcp` serves the lookups and the check
39
+ over the Model Context Protocol on stdin and stdout, with no dependencies to install.
39
40
 
40
41
  `check` says how much it read. `evaluation_status` is `evaluated_clean` only when every file was
41
42
  read in full and nothing was found; otherwise it is `evaluated_with_findings`,
@@ -44,15 +45,15 @@ with its place; or some files did not parse), `not_evaluated` (no file parsed) o
44
45
  `no_files_evaluated` (nothing was read, for example a Markdown file). A file that does not parse
45
46
  is reported as `SYNTAX_ERROR` findings and is never clean. Types and rendering are not checked.
46
47
  Exit codes: `0` when what was read has no errors (warnings fail only with `--strict`; limits do not
47
- fail the run), `1` for an error, a file that did not parse, no file read, or no usable TypeScript,
48
+ fail the run), `1` for an error, a file that did not parse, no file read, or a parser that cannot be loaded,
48
49
  `2` for a usage error or a path that does not exist.
49
50
 
50
51
  Every command takes `--json`, `list` and `add` included, and answers
51
- `{ "apiVersion": 1, "type": "…", "identity": {…}, "data": … }`. `identity` keeps four things
52
+ `{ "apiVersion": 2, "type": "…", "identity": {…}, "data": … }`. `identity` keeps four things
52
53
  apart: `cli_version` (this package), `contract_version` (the `@oprt/react` version the contract
53
54
  describes), `contract_digest` (`sha256:` of `dist/contract.json`) and `schema_version` (this
54
55
  result format, the same number as `apiVersion`). A failure is
55
- `{ "apiVersion": 1, "error": "…", "code": "ERR_…", "suggestions": […], "identity": {…} }`; codes
56
+ `{ "apiVersion": 2, "error": "…", "code": "ERR_…", "suggestions": […], "identity": {…} }`; codes
56
57
  are stable and only ever added to. `component --dense --json` is a compact form of the same data.
57
58
  `oprt mcp` returns the same envelope as each tool's structured result, with an `outputSchema` on
58
59
  every tool (a summary of the full schema, so the tool list is about 5.4 KB); a check that finds problems is a successful call, and a call that could not run is an