@orygn/opa-mcp 0.5.0 → 0.6.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/CHANGELOG.md +244 -1
- package/README.md +98 -51
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +13 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -5
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +1 -6
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -3
- package/dist/constants.js.map +1 -1
- package/dist/lib/conftest-cli.d.ts.map +1 -1
- package/dist/lib/conftest-cli.js +81 -17
- package/dist/lib/conftest-cli.js.map +1 -1
- package/dist/lib/errors.d.ts +4 -5
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +15 -3
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/inline-paths.d.ts +37 -0
- package/dist/lib/inline-paths.d.ts.map +1 -0
- package/dist/lib/inline-paths.js +162 -0
- package/dist/lib/inline-paths.js.map +1 -0
- package/dist/lib/opa-cli.d.ts +10 -0
- package/dist/lib/opa-cli.d.ts.map +1 -1
- package/dist/lib/opa-cli.js +9 -2
- package/dist/lib/opa-cli.js.map +1 -1
- package/dist/lib/opa-client.d.ts +27 -1
- package/dist/lib/opa-client.d.ts.map +1 -1
- package/dist/lib/opa-client.js +98 -14
- package/dist/lib/opa-client.js.map +1 -1
- package/dist/lib/opa-paths.d.ts +11 -1
- package/dist/lib/opa-paths.d.ts.map +1 -1
- package/dist/lib/opa-paths.js +25 -21
- package/dist/lib/opa-paths.js.map +1 -1
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +83 -10
- package/dist/lib/output.js.map +1 -1
- package/dist/lib/rego-ast-walker.d.ts +0 -6
- package/dist/lib/rego-ast-walker.d.ts.map +1 -1
- package/dist/lib/rego-ast-walker.js +48 -46
- package/dist/lib/rego-ast-walker.js.map +1 -1
- package/dist/lib/rego-counterexample.d.ts +14 -1
- package/dist/lib/rego-counterexample.d.ts.map +1 -1
- package/dist/lib/rego-counterexample.js +40 -10
- package/dist/lib/rego-counterexample.js.map +1 -1
- package/dist/lib/rego-input-path.d.ts +20 -0
- package/dist/lib/rego-input-path.d.ts.map +1 -0
- package/dist/lib/rego-input-path.js +70 -0
- package/dist/lib/rego-input-path.js.map +1 -0
- package/dist/lib/rego-ir.d.ts +2 -1
- package/dist/lib/rego-ir.d.ts.map +1 -1
- package/dist/lib/rego-smt-encoder.d.ts +35 -0
- package/dist/lib/rego-smt-encoder.d.ts.map +1 -1
- package/dist/lib/rego-smt-encoder.js +81 -8
- package/dist/lib/rego-smt-encoder.js.map +1 -1
- package/dist/lib/rego-type-inferencer.d.ts +26 -1
- package/dist/lib/rego-type-inferencer.d.ts.map +1 -1
- package/dist/lib/rego-type-inferencer.js +68 -0
- package/dist/lib/rego-type-inferencer.js.map +1 -1
- package/dist/lib/rego-verify-engine.d.ts.map +1 -1
- package/dist/lib/rego-verify-engine.js +171 -90
- package/dist/lib/rego-verify-engine.js.map +1 -1
- package/dist/lib/rego-z3.d.ts +56 -0
- package/dist/lib/rego-z3.d.ts.map +1 -1
- package/dist/lib/rego-z3.js +276 -7
- package/dist/lib/rego-z3.js.map +1 -1
- package/dist/lib/subprocess.d.ts +13 -0
- package/dist/lib/subprocess.d.ts.map +1 -1
- package/dist/lib/subprocess.js +153 -18
- package/dist/lib/subprocess.js.map +1 -1
- package/dist/lib/tool-helpers.d.ts +12 -25
- package/dist/lib/tool-helpers.d.ts.map +1 -1
- package/dist/lib/tool-helpers.js +66 -40
- package/dist/lib/tool-helpers.js.map +1 -1
- package/dist/prompts/index.js +2 -2
- package/dist/resources/index.js +1 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/patterns.d.ts +1 -1
- package/dist/resources/patterns.d.ts.map +1 -1
- package/dist/resources/patterns.js +2 -3
- package/dist/resources/patterns.js.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +40 -5
- package/dist/server.js.map +1 -1
- package/dist/tools/authoring/capabilities.d.ts +4 -0
- package/dist/tools/authoring/capabilities.d.ts.map +1 -1
- package/dist/tools/authoring/capabilities.js +41 -4
- package/dist/tools/authoring/capabilities.js.map +1 -1
- package/dist/tools/authoring/check-schema.d.ts +6 -0
- package/dist/tools/authoring/check-schema.d.ts.map +1 -1
- package/dist/tools/authoring/check-schema.js +56 -3
- package/dist/tools/authoring/check-schema.js.map +1 -1
- package/dist/tools/authoring/format.d.ts.map +1 -1
- package/dist/tools/authoring/format.js +2 -2
- package/dist/tools/authoring/format.js.map +1 -1
- package/dist/tools/authoring/lint.d.ts.map +1 -1
- package/dist/tools/authoring/lint.js +8 -6
- package/dist/tools/authoring/lint.js.map +1 -1
- package/dist/tools/authoring/migrate-v1.d.ts.map +1 -1
- package/dist/tools/authoring/migrate-v1.js +20 -4
- package/dist/tools/authoring/migrate-v1.js.map +1 -1
- package/dist/tools/authoring/parse.d.ts.map +1 -1
- package/dist/tools/authoring/parse.js +3 -3
- package/dist/tools/authoring/parse.js.map +1 -1
- package/dist/tools/bundles/sign.d.ts.map +1 -1
- package/dist/tools/bundles/sign.js +14 -34
- package/dist/tools/bundles/sign.js.map +1 -1
- package/dist/tools/conftest/index.d.ts +5 -0
- package/dist/tools/conftest/index.d.ts.map +1 -1
- package/dist/tools/conftest/index.js.map +1 -1
- package/dist/tools/conftest/test.d.ts.map +1 -1
- package/dist/tools/conftest/test.js +16 -17
- package/dist/tools/conftest/test.js.map +1 -1
- package/dist/tools/conftest/verify.d.ts.map +1 -1
- package/dist/tools/conftest/verify.js +14 -18
- package/dist/tools/conftest/verify.js.map +1 -1
- package/dist/tools/evaluation/_shared.js +9 -12
- package/dist/tools/evaluation/_shared.js.map +1 -1
- package/dist/tools/evaluation/bench.d.ts +20 -9
- package/dist/tools/evaluation/bench.d.ts.map +1 -1
- package/dist/tools/evaluation/bench.js +31 -12
- package/dist/tools/evaluation/bench.js.map +1 -1
- package/dist/tools/evaluation/compile.js +4 -4
- package/dist/tools/evaluation/compile.js.map +1 -1
- package/dist/tools/evaluation/eval.d.ts.map +1 -1
- package/dist/tools/evaluation/eval.js +12 -16
- package/dist/tools/evaluation/eval.js.map +1 -1
- package/dist/tools/evaluation/exec.d.ts.map +1 -1
- package/dist/tools/evaluation/exec.js +3 -4
- package/dist/tools/evaluation/exec.js.map +1 -1
- package/dist/tools/evaluation/test-multiroot.d.ts +2 -0
- package/dist/tools/evaluation/test-multiroot.d.ts.map +1 -1
- package/dist/tools/evaluation/test-multiroot.js +23 -6
- package/dist/tools/evaluation/test-multiroot.js.map +1 -1
- package/dist/tools/evaluation/test.d.ts.map +1 -1
- package/dist/tools/evaluation/test.js +8 -6
- package/dist/tools/evaluation/test.js.map +1 -1
- package/dist/tools/helpers/coverage-gaps.d.ts.map +1 -1
- package/dist/tools/helpers/coverage-gaps.js +3 -4
- package/dist/tools/helpers/coverage-gaps.js.map +1 -1
- package/dist/tools/helpers/describe-policy.d.ts.map +1 -1
- package/dist/tools/helpers/describe-policy.js +2 -2
- package/dist/tools/helpers/describe-policy.js.map +1 -1
- package/dist/tools/helpers/explain-decision.d.ts.map +1 -1
- package/dist/tools/helpers/explain-decision.js +3 -4
- package/dist/tools/helpers/explain-decision.js.map +1 -1
- package/dist/tools/helpers/explain-undefined.d.ts.map +1 -1
- package/dist/tools/helpers/explain-undefined.js +131 -22
- package/dist/tools/helpers/explain-undefined.js.map +1 -1
- package/dist/tools/helpers/fix.d.ts +11 -5
- package/dist/tools/helpers/fix.d.ts.map +1 -1
- package/dist/tools/helpers/fix.js +88 -45
- package/dist/tools/helpers/fix.js.map +1 -1
- package/dist/tools/helpers/generate-test-skeleton.d.ts.map +1 -1
- package/dist/tools/helpers/generate-test-skeleton.js +105 -21
- package/dist/tools/helpers/generate-test-skeleton.js.map +1 -1
- package/dist/tools/helpers/playground-share.d.ts +4 -2
- package/dist/tools/helpers/playground-share.d.ts.map +1 -1
- package/dist/tools/helpers/playground-share.js +13 -3
- package/dist/tools/helpers/playground-share.js.map +1 -1
- package/dist/tools/helpers/policy-diff.d.ts.map +1 -1
- package/dist/tools/helpers/policy-diff.js +3 -4
- package/dist/tools/helpers/policy-diff.js.map +1 -1
- package/dist/tools/helpers/security-audit.d.ts.map +1 -1
- package/dist/tools/helpers/security-audit.js +19 -19
- package/dist/tools/helpers/security-audit.js.map +1 -1
- package/dist/tools/meta/index.d.ts +1 -1
- package/dist/tools/server-management/_shared.d.ts.map +1 -1
- package/dist/tools/server-management/_shared.js +13 -1
- package/dist/tools/server-management/_shared.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,247 @@ not part of the public surface and may change in minor releases.
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [0.6.0] - 2026-09-07
|
|
21
|
+
|
|
22
|
+
### Security
|
|
23
|
+
|
|
24
|
+
- `rego_playground_share` created public Gists, listed on the account and
|
|
25
|
+
searchable, while the README described them as secret. Anyone who shared a
|
|
26
|
+
policy with it should assume the policy was public from the moment it was
|
|
27
|
+
posted. Gists are now secret unless `public: true` is passed: reachable by
|
|
28
|
+
their link, listed nowhere. The change is not retroactive: GitHub cannot make
|
|
29
|
+
an existing Gist secret, so a Gist created earlier that should not have been
|
|
30
|
+
public has to be deleted at github.com/gists and shared again.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- `rego_bench` reports `iterations`, `nsPerOp`, `allocsPerOp` and
|
|
35
|
+
`bytesPerOp`, whole numbers as opa's own summary prints them, and keeps the
|
|
36
|
+
document opa printed under `raw` for a single run. Its fields `N`, `T`,
|
|
37
|
+
`Bytes`, `MemAllocs`, `MemBytes` and `Extra` were top-level before and now
|
|
38
|
+
sit under `raw`; the type had promised `iterations` and `metrics`, which
|
|
39
|
+
were never set. With `count` above one, `runs` holds every document and
|
|
40
|
+
`fastest` indexes the one the figures come from, so none is repeated.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- `rego_capabilities` takes a `builtins` filter of up to 100 names and returns
|
|
45
|
+
their full records under `builtins`, with a `matched` count and the
|
|
46
|
+
`missing` names. When the records would not fit the response cap it returns
|
|
47
|
+
`OUTPUT_TOO_LARGE` rather than a truncated result, and `names_only: true`
|
|
48
|
+
alongside it is refused as a contradiction; `names_only: false`
|
|
49
|
+
returns every record and is documented as needing the cap raised.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- Windows: a Rego module on a different drive from the server's working
|
|
54
|
+
directory was reported missing. The 0.5.0 drive-letter fix respelled data
|
|
55
|
+
documents relative to a working directory on their drive but left modules
|
|
56
|
+
absolute, since a module mounts at its own `package` whatever path it
|
|
57
|
+
arrives by. OPA still opens the module by the remainder after the colon, a
|
|
58
|
+
root-relative path it resolves against the drive the child is running on, so
|
|
59
|
+
a module on any other drive failed with a file-not-found. Every load path now
|
|
60
|
+
takes part in choosing the working directory; only data documents are
|
|
61
|
+
respelled.
|
|
62
|
+
- Windows: `rego_check` with inline source and `rego_inspect` reported a
|
|
63
|
+
module missing when the server's temp directory was on a different drive
|
|
64
|
+
from its working directory, and `conftest_test` and `conftest_verify` failed
|
|
65
|
+
the same way through `--policy`. OPA and conftest open an absolute path by
|
|
66
|
+
the part after its first colon, resolved on the drive the process runs on;
|
|
67
|
+
each command now runs from the path's own drive. The configs under test are
|
|
68
|
+
read by conftest itself and may sit on any drive; a policy and a data
|
|
69
|
+
directory spread across two drives are refused with a message saying so.
|
|
70
|
+
- The subprocess timeout is now hard on Linux and macOS. The SIGKILL escalation
|
|
71
|
+
fired on a flag Node sets when a signal is sent rather than when the child
|
|
72
|
+
ends, so a child that ignored SIGTERM hung the tool call for good, and a
|
|
73
|
+
wrapper script that left a grandchild holding the pipes kept the result from
|
|
74
|
+
ever settling. A child killed from outside the server is reported as
|
|
75
|
+
`SUBPROCESS_KILLED` naming the signal, not as a missing binary. On SIGINT or
|
|
76
|
+
SIGTERM the server now signals the children it started before exiting.
|
|
77
|
+
- `rego_eval`, `rego_eval_with_explain`, `rego_eval_with_profile`,
|
|
78
|
+
`rego_eval_with_coverage`, `rego_compile_query`, `rego_explain_decision`: a
|
|
79
|
+
string input that happened to parse as JSON, such as `"42"`, `"true"` or a
|
|
80
|
+
quoted string, was retyped or unwrapped before evaluation. Strings now reach
|
|
81
|
+
the policy as strings; only an object or array that arrived serialized as a
|
|
82
|
+
string is still repaired, the way `rego_bench` and the server-management
|
|
83
|
+
tools already did.
|
|
84
|
+
- `rego_fix`: a real run reported zero fixes and no changed files after
|
|
85
|
+
changing them, because only the dry-run wording of regal's summary was read.
|
|
86
|
+
Both forms are read now.
|
|
87
|
+
- `opa_*` server tools: a request that OPA did not answer within
|
|
88
|
+
`OPA_MCP_HTTP_TIMEOUT_MS` was reported as `OPA_UNREACHABLE`, with a hint to
|
|
89
|
+
start a server that was already running. It is now `TIMEOUT`, naming the
|
|
90
|
+
limit, and the timer covers the response body as well as the headers.
|
|
91
|
+
- `conftest_test`: a denial reported under `failOnWarn` came back as a tool
|
|
92
|
+
error rather than as a failed check, because conftest exits 2 for it. Any
|
|
93
|
+
exit code with results on stdout is now an outcome, and only output without
|
|
94
|
+
results is treated as a command error, whose message now carries conftest's
|
|
95
|
+
own text; `conftest_verify` shares that last part.
|
|
96
|
+
- `rego_verify`: a policy that exhausted the Z3 WASM heap took the whole
|
|
97
|
+
server down, since the abort surfaced outside every try/catch. The solver is
|
|
98
|
+
now bounded at 768 MB, under a 1 GiB ceiling on Z3's allocations, so an
|
|
99
|
+
oversized problem comes back inconclusive.
|
|
100
|
+
- `rego_verify`: a helper whose body contains a literal `false` was inlined as
|
|
101
|
+
an always-true body, so a rule that can never fire was reported proven always
|
|
102
|
+
true, and a negated literal (`not false`, `not true`) was read as the bare
|
|
103
|
+
one in helpers and rule bodies alike. Boolean literals are now read as what
|
|
104
|
+
they say, and a helper with a true default and a body that never holds is
|
|
105
|
+
recognised as always holding.
|
|
106
|
+
- Every tool that evaluates Rego, including the Regal tools that run a
|
|
107
|
+
project's custom rules, now declares `openWorldHint: true` and no longer
|
|
108
|
+
claims `readOnlyHint`, since a policy's own `http.send` can reach, and write
|
|
109
|
+
to, a remote system. A client that gates on the hints will ask before running
|
|
110
|
+
one. The destructive and idempotent hints on those tools are left to the
|
|
111
|
+
spec's defaults, since a policy chooses its own HTTP method.
|
|
112
|
+
- Docker: the `opa` and `regal` downloads in the image build are now checked
|
|
113
|
+
against the digests published with their releases. The image was described
|
|
114
|
+
as reproducible while nothing verified those downloads; the wording now says
|
|
115
|
+
what the build does.
|
|
116
|
+
- `rego_security_audit` was described as running regal's `security` and
|
|
117
|
+
`bugs` categories; regal ships no `security` category, so that half of the
|
|
118
|
+
sweep matched nothing. The description now says what runs: the `bugs`
|
|
119
|
+
category, plus any custom rules a project places in a `security` category.
|
|
120
|
+
- `rego_explain_undefined`: on the path where OPA's indexer skips the rule, the
|
|
121
|
+
blocking condition was chosen from each body expression evaluated on its own,
|
|
122
|
+
so an expression that needs an earlier local or a sibling rule came back
|
|
123
|
+
unevaluable and was blamed ahead of the guard that really failed. The body is
|
|
124
|
+
now evaluated as cumulative prefixes inside the rule's package, with its
|
|
125
|
+
imports, and the first condition that stops holding is the one reported; the
|
|
126
|
+
conditions after it are left unevaluated, as on the traced path.
|
|
127
|
+
- `rego_check_schema` reported `valid: true` when `schemaPath` was a
|
|
128
|
+
directory, since opa reads a schema directory only through `schemas:`
|
|
129
|
+
annotations in the policy. A directory is now accepted when the policy
|
|
130
|
+
carries them (read from the source, or reported by `opa inspect` for files
|
|
131
|
+
on disk) and refused before opa runs when it does not, with the file form,
|
|
132
|
+
`inlineSchema` and the annotation named as the ways to make it work.
|
|
133
|
+
- `opa_bundle_sign` reported `signed: true` for a `.tar.gz` archive after
|
|
134
|
+
writing a `.signatures.json` beside it, which OPA never reads, so the
|
|
135
|
+
archive stayed unsigned. An archive is now refused with a pointer to
|
|
136
|
+
`opa_bundle_build`, which produces a signed one. The `outputDir` input,
|
|
137
|
+
which only applied to archives, is gone.
|
|
138
|
+
- `OPA_MCP_MAX_RESPONSE_BYTES` now bounds error envelopes as well as
|
|
139
|
+
results. An oversize error was sent whole with `truncated: true` set; its
|
|
140
|
+
details are now dropped first and its message cut last, so the code and
|
|
141
|
+
the message stay readable within the cap.
|
|
142
|
+
The cap bounds a success envelope's warnings as well, and
|
|
143
|
+
`OPA_MCP_MAX_RESPONSE_BYTES` refuses a value below 512, which sits above
|
|
144
|
+
the smallest complete envelope, rather than exceeding it.
|
|
145
|
+
- The temp directory inline source is written to could appear in the error
|
|
146
|
+
details of a dozen tools, in the message a binary printed about the file.
|
|
147
|
+
Every error envelope now passes through the sanitiser, which also covers a
|
|
148
|
+
JSON-encoded spelling, a directory name with a space, the inline schema and
|
|
149
|
+
bundle-verify temp files, and takes linear time on any input.
|
|
150
|
+
The server's own temp directory is matched by its exact spelling first,
|
|
151
|
+
so no guess about where a path begins is involved for the files it writes.
|
|
152
|
+
- `rego_explain_undefined` turned a spawn failure during its per-condition
|
|
153
|
+
evals or its parse step into a per-condition note or an empty analysis. A
|
|
154
|
+
binary that cannot run or a run that timed out now returns the tool's
|
|
155
|
+
`OPA_BINARY_NOT_FOUND` or `TIMEOUT` like every other tool.
|
|
156
|
+
- `rego_explain_undefined` validated `inputPath` and then passed the argument
|
|
157
|
+
as written to opa instead of the resolved path.
|
|
158
|
+
- The `*_BINARY` variables now refuse a relative path at startup, which the
|
|
159
|
+
README said they did, a drive-relative or root-relative name included; a
|
|
160
|
+
bare command name or an absolute path is accepted.
|
|
161
|
+
- Docs: the install note described a missing-`opa` failure that the npm
|
|
162
|
+
package's bundled binary already prevents, and now says where it still
|
|
163
|
+
applies; CONTRIBUTING said input fields are `snake_case` when the surface
|
|
164
|
+
is `camelCase`; two prompts sent readers to `rego_describe_policy` for input
|
|
165
|
+
refs, which `rego_infer_input_schema` reports.
|
|
166
|
+
- `rego_migrate_v1` reported a built-in that v1 removed, which fails type
|
|
167
|
+
checking in the `opa fmt --rego-v1` phase, as a parse failure with advice to
|
|
168
|
+
fix syntax. The type error opa gives is now the message, with a hint to
|
|
169
|
+
replace the built-in first; the description says so.
|
|
170
|
+
- `rego_verify`: a quoted key holding a dot, `input["a.b"]`, and the nested
|
|
171
|
+
path `input.a.b` were treated as one field, so a rule reading both was
|
|
172
|
+
proved never true, and a witness for the quoted key was built as the nested
|
|
173
|
+
object. Paths are now rendered the way Rego writes them and read back the
|
|
174
|
+
same way.
|
|
175
|
+
The soundness fuzz now carries quoted keys, so it exercises this.
|
|
176
|
+
- `conftest_test`, `conftest_verify`: an error from conftest named the temp
|
|
177
|
+
file an inline config or policy had been written to, a file the tool had
|
|
178
|
+
already removed. The path is replaced in stderr as it already was in the
|
|
179
|
+
results.
|
|
180
|
+
- `rego_verify`: a witness holding a non-ASCII string came back in Z3's
|
|
181
|
+
escape text, one escape per byte, which OPA did not accept as the string
|
|
182
|
+
the policy compares against. The escapes are decoded now. A backslash in a
|
|
183
|
+
policy literal is escaped on the way into Z3, so a literal that spells such
|
|
184
|
+
an escape itself is no longer read as one.
|
|
185
|
+
- Docs: the README now says an argument that fails a tool's input schema is
|
|
186
|
+
rejected by the MCP layer before the handler runs, names `rego_verify`'s
|
|
187
|
+
`kind` field, and describes `rego_suggest_fix` as returning suggestions with
|
|
188
|
+
a confidence level; the `opa://builtins` resource says which `opa` binary
|
|
189
|
+
it reflects.
|
|
190
|
+
- `rego_verify`: a field compared as a string, number or boolean and also read
|
|
191
|
+
as the object holding a deeper field was modelled as two unrelated values,
|
|
192
|
+
so a rule no input can satisfy was reported satisfiable with a witness OPA
|
|
193
|
+
rejects. The solver now knows that a field the rule compared equal to a
|
|
194
|
+
scalar, or fed to a string built-in, is never present alongside a path
|
|
195
|
+
beneath it. A rule that compares such a field in any other way (an
|
|
196
|
+
inequality, an ordering, a bare read, a comparison against another field)
|
|
197
|
+
and also reads beneath it is reported inconclusive, since the model gives
|
|
198
|
+
the field one scalar value that no input holding the deeper field can
|
|
199
|
+
match; before, that produced a counterexample OPA rejects. Both readings
|
|
200
|
+
are taken from the rule under test alone, so another rule in the module
|
|
201
|
+
does not decide either.
|
|
202
|
+
- `rego_verify` built its witness from every input path in the policy, so a
|
|
203
|
+
field only another rule reads was given a value and placed in the input.
|
|
204
|
+
Where that field was the parent of one the rule under test reads, the two
|
|
205
|
+
collided and the witness no longer satisfied the rule: `allow if input.x.y
|
|
206
|
+
== 2` beside `other if input.x > 1` returned `{"x": 0}`, which the policy
|
|
207
|
+
evaluates to undefined, and reported it as proof the rule can be true. A
|
|
208
|
+
witness now names only the fields its own rule reads. The witness
|
|
209
|
+
search that prefers every field present also re-checks after backing out,
|
|
210
|
+
rather than reading a stale model.
|
|
211
|
+
- `rego_test` with `coverage` or `threshold` and `count` above 1 returned no
|
|
212
|
+
coverage and reported the threshold as met: opa prints one report per
|
|
213
|
+
repetition and the concatenation did not parse as JSON, so none was read.
|
|
214
|
+
One is read now.
|
|
215
|
+
- `rego_test_multiroot` in coverage mode reported a root holding a `todo_`
|
|
216
|
+
test as failed and dropped its report, as `rego_test` used to; the report is
|
|
217
|
+
kept and the root passes.
|
|
218
|
+
- `rego_generate_test_skeleton` referenced every rule the same way, so a
|
|
219
|
+
function rule made the generated file fail to compile and a set, object or
|
|
220
|
+
value rule was compared to `true`. Each stub now follows the rule's head: a
|
|
221
|
+
function is called with placeholder arguments, a set or object is compared
|
|
222
|
+
to an empty one, a value rule to its literal when the head is one; a
|
|
223
|
+
computed head, which offers nothing to assert, becomes a `todo_test_` that
|
|
224
|
+
opa test skips rather than a placeholder that passes. The generated file no longer
|
|
225
|
+
imports the package it references by full path, which `opa check --strict`
|
|
226
|
+
reported as an unused import.
|
|
227
|
+
- A username and password embedded in `OPA_URL` were echoed into every
|
|
228
|
+
`opa_*` error envelope and the startup log, and made every call fail as
|
|
229
|
+
`OPA_UNREACHABLE`, since the HTTP client refuses such a URL. They are now
|
|
230
|
+
redacted wherever the URL is shown, and such a URL is refused with
|
|
231
|
+
`OPA_URL_INVALID` and a hint to use `OPA_TOKEN`.
|
|
232
|
+
Only the credentials are removed from the URL shown; its case, port and
|
|
233
|
+
path stay as the operator wrote them.
|
|
234
|
+
- `rego_verify` never gave the Z3 engine's memory back: its solver and
|
|
235
|
+
model were left to the JavaScript collector, which cannot see Z3's heap and
|
|
236
|
+
so had no reason to run, and the engine grew by half to one megabyte per
|
|
237
|
+
solve until its ceiling, between 600 MB and 1.7 GB over 1500 solves in the
|
|
238
|
+
same process depending on the run, with verdicts degrading to inconclusive
|
|
239
|
+
along the way. The solver is released as each solve ends, and its model
|
|
240
|
+
with it; 1500 solves now hold at about 210 MB.
|
|
241
|
+
- `rego_verify` could fault Z3 intermittently, which disabled verification
|
|
242
|
+
until the server restarted: z3-solver frees its objects from finalizers on
|
|
243
|
+
the main thread while a solve runs on a worker over the same shared
|
|
244
|
+
memory, and one landing mid-solve corrupted the heap. Finalizers are now
|
|
245
|
+
held while a solve runs, and a fault brings up a fresh Z3 on the next call,
|
|
246
|
+
three times per process, with the interrupted call retried once.
|
|
247
|
+
- The server reported itself as 0.4.0 on the 0.5.0 release, in the MCP
|
|
248
|
+
handshake, `mcp_server_info`, `--version` and the startup log: the version
|
|
249
|
+
was a constant kept apart from package.json. It is now read from
|
|
250
|
+
package.json, a test holds package.json, manifest.json and server.json to
|
|
251
|
+
one version, and a release stops before publishing when its tag names a
|
|
252
|
+
version package.json does not carry.
|
|
253
|
+
- The startup warning and hint for a missing `regal` named `rego_lint` alone;
|
|
254
|
+
`rego_security_audit` and `rego_fix` need it too, and the manifest, the
|
|
255
|
+
registry entry and the Smithery config say so now. `--help` lists
|
|
256
|
+
`OPA_MCP_BLOCK_ENV`. `conftest_verify` said an omitted `namespace` both
|
|
257
|
+
defaulted to `main` and verified all namespaces; it verifies all.
|
|
258
|
+
`rego_check_schema` and `rego_playground_share` describe the schema
|
|
259
|
+
directory form and the `public` field they already had.
|
|
260
|
+
|
|
20
261
|
## [0.5.0] - 2026-09-04
|
|
21
262
|
|
|
22
263
|
### Security
|
|
@@ -1364,7 +1605,9 @@ wrappers end-to-end. CI matrix: Ubuntu, macOS, and Windows on Node
|
|
|
1364
1605
|
20 and 22, plus CodeQL security scanning and weekly Dependabot updates
|
|
1365
1606
|
for npm, GitHub Actions, and Docker base images.
|
|
1366
1607
|
|
|
1367
|
-
[Unreleased]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.
|
|
1608
|
+
[Unreleased]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.6.0...HEAD
|
|
1609
|
+
[0.6.0]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.5.0...v0.6.0
|
|
1610
|
+
[0.5.0]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.4.0...v0.5.0
|
|
1368
1611
|
[0.4.0]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.3.0...v0.4.0
|
|
1369
1612
|
[0.3.0]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.2.1...v0.3.0
|
|
1370
1613
|
[0.2.1]: https://github.com/OrygnsCode/opa-mcp-server/compare/v0.2.0...v0.2.1
|
package/README.md
CHANGED
|
@@ -22,10 +22,17 @@ environment.
|
|
|
22
22
|
+--------------------+ 52 tools +-----------------+ +---------------------+
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
> **Status:** v0.
|
|
25
|
+
> **Status:** v0.6.0. Tool surface, error codes, and
|
|
26
26
|
> environment variables follow [SemVer](https://semver.org/) from
|
|
27
27
|
> v0.1.0 forward.
|
|
28
28
|
|
|
29
|
+
> **Upgrading to 0.6.0:** `rego_bench` reports `iterations`, `nsPerOp`,
|
|
30
|
+
> `allocsPerOp` and `bytesPerOp`. The fields opa prints (`N`, `T`, `Bytes`,
|
|
31
|
+
> `MemAllocs`, `MemBytes`, `Extra`) were top-level and now sit under `raw`
|
|
32
|
+
> for a single run, so anything that read them from the top level has to
|
|
33
|
+
> look there. With `count` above one, `raw` is omitted: every document is in
|
|
34
|
+
> `runs`, and `fastest` indexes the one the top-level figures come from.
|
|
35
|
+
|
|
29
36
|
> **Upgrading to 0.4.0:** subprocesses no longer inherit the server's
|
|
30
37
|
> environment. A policy that read a variable through `opa.runtime().env`
|
|
31
38
|
> will no longer see it; name the variable in `OPA_MCP_PASSTHROUGH_ENV` if
|
|
@@ -216,11 +223,15 @@ The image is multi-arch (`linux/amd64`, `linux/arm64`), bundles pinned
|
|
|
216
223
|
versions of `opa` and `regal`, and runs as a non-root user. No host
|
|
217
224
|
install of OPA or Regal is required.
|
|
218
225
|
|
|
219
|
-
### ⚠
|
|
226
|
+
### ⚠ If every tool call returns `OPA_BINARY_NOT_FOUND`
|
|
220
227
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
The npm package carries its own `opa` for the five platforms it is built
|
|
229
|
+
for, so a client `PATH` without `opa` on it does not matter there. The MCPB
|
|
230
|
+
has no bundled copy, and on any other platform neither does npm: then the
|
|
231
|
+
server boots but every tool call returns `OPA_BINARY_NOT_FOUND`. Neither the
|
|
232
|
+
npm package nor the MCPB bundles `regal` or `conftest`, and the Docker image
|
|
233
|
+
ships `regal` but not `conftest`, so their tools need a `PATH` entry or an
|
|
234
|
+
explicit path either way.
|
|
224
235
|
|
|
225
236
|
**Fix:** add `OPA_BINARY` and `REGAL_BINARY` env entries to your client
|
|
226
237
|
config with the absolute path to each binary. The example configs under
|
|
@@ -257,17 +268,18 @@ variable is optional; defaults are sensible for a local OPA on
|
|
|
257
268
|
| `OPA_MCP_ALLOWED_PATHS` | _(unset)_ | Comma- or semicolon-separated list of directories the server is allowed to read policies from. **When unset, file-based tools refuse to read from disk.** |
|
|
258
269
|
| `OPA_MCP_LOG_FILE` | `<tmpdir>/orygn-opa-mcp.log` | Path the server appends logs to. The server never writes to stdout; that channel is reserved for the MCP protocol. |
|
|
259
270
|
| `OPA_MCP_LOG_LEVEL` | `info` | One of `debug`, `info`, `warn`, `error`. |
|
|
260
|
-
| `OPA_MCP_MAX_RESPONSE_BYTES` | `100000` | Hard cap on a single tool response. Larger payloads are truncated with a `__truncated: true` marker.
|
|
271
|
+
| `OPA_MCP_MAX_RESPONSE_BYTES` | `100000` | Hard cap on a single tool response. Larger payloads are truncated with a `__truncated: true` marker. Values below 512 are refused. |
|
|
261
272
|
| `OPA_MCP_TIMEOUT_MS` | `30000` | Hard timeout for any spawned subprocess (`opa`, `regal`). After this, the child gets `SIGTERM` and then `SIGKILL`. |
|
|
262
|
-
| `OPA_MCP_HTTP_TIMEOUT_MS` | `15000` | Timeout for
|
|
273
|
+
| `OPA_MCP_HTTP_TIMEOUT_MS` | `15000` | Timeout for each request to the OPA REST API, from the connection attempt to the last byte of the response; reported as `TIMEOUT`. |
|
|
263
274
|
| `OPA_MCP_NO_TELEMETRY` | _(unset)_ | Set to `1` to disable the anonymous startup ping. The ping sends the server version, OS platform, and a random install ID. The install ID is stored at `~/.orygn/opa-mcp/install-id` and is generated once on first run. No policy content or file paths are ever sent. |
|
|
264
275
|
| `OPA_MCP_MAX_SUBPROCESS_BYTES` | `33554432` (32 MiB) | Maximum bytes captured from a subprocess's stdout and stderr, counted separately. On overflow the stream is clamped, the child is stopped, and the tool returns `OUTPUT_TOO_LARGE`. Distinct from `OPA_MCP_MAX_RESPONSE_BYTES`, which trims the reply after the output is already in memory. |
|
|
265
276
|
| `OPA_MCP_PASSTHROUGH_ENV` | _(unset)_ | Comma-separated variable names to pass through to `opa`, `regal` and `conftest`. Everything else is withheld. **Anything named here is readable by any policy the server evaluates**, via `opa.runtime().env`, so use it only for values that are safe in that position. |
|
|
266
277
|
| `OPA_MCP_BLOCK_ENV` | _(unset)_ | Comma-separated variable names to withhold from `opa`, `regal` and `conftest` even when they are on the built-in allow-list. Applied last, so it also overrides `OPA_MCP_PASSTHROUGH_ENV`. Use it to drop the proxy variables, which can carry credentials, at the cost of proxy support. |
|
|
267
278
|
|
|
268
|
-
Paths in `OPA_MCP_ALLOWED_PATHS` and
|
|
269
|
-
|
|
270
|
-
|
|
279
|
+
Paths in `OPA_MCP_ALLOWED_PATHS` must be absolute, and a `*_BINARY` value is
|
|
280
|
+
either a bare command name looked up on `PATH` or an absolute path; anything
|
|
281
|
+
else stops the server at startup. A binary that cannot be run is reported by
|
|
282
|
+
each tool call with a structured error.
|
|
271
283
|
|
|
272
284
|
## Tool reference
|
|
273
285
|
|
|
@@ -283,7 +295,7 @@ Stable error codes: `INVALID_INPUT`, `INVALID_REGO`, `INVALID_BUNDLE`,
|
|
|
283
295
|
`CONFTEST_NOT_FOUND`, `OPA_UNREACHABLE`, `OPA_AUTH_FAILED`,
|
|
284
296
|
`POLICY_NOT_FOUND`, `DATA_NOT_FOUND`, `PATH_NOT_ALLOWED`, `PATH_NOT_FOUND`,
|
|
285
297
|
`NO_TESTS_FOUND`, `COVERAGE_BELOW_THRESHOLD`, `OPA_VERSION_UNSUPPORTED`,
|
|
286
|
-
`GITHUB_TOKEN_MISSING`, `GIST_CREATE_FAILED`, `OUTPUT_TOO_LARGE`, `TIMEOUT`,
|
|
298
|
+
`GITHUB_TOKEN_MISSING`, `GIST_CREATE_FAILED`, `OUTPUT_TOO_LARGE`, `SUBPROCESS_KILLED`, `OPA_URL_INVALID`, `TIMEOUT`,
|
|
287
299
|
`CANCELLED`, `UNKNOWN_ERROR`.
|
|
288
300
|
|
|
289
301
|
### Category A: Authoring & static analysis
|
|
@@ -292,17 +304,17 @@ Operate on Rego source code without needing a running OPA server. Wrap
|
|
|
292
304
|
`opa fmt`, `opa parse`, `opa check`, `opa inspect`, `opa capabilities`,
|
|
293
305
|
`opa deps`, and `regal`.
|
|
294
306
|
|
|
295
|
-
| Tool | What it does
|
|
296
|
-
| ------------------- |
|
|
297
|
-
| `rego_format` | Format Rego source. Wraps `opa fmt`. Idempotent.
|
|
298
|
-
| `rego_check` | Type-check and validate Rego. Wraps `opa check`.
|
|
299
|
-
| `rego_lint` | Run Regal across a file or directory. Returns each violation with its category, level and location. **Requires `regal` on `PATH` or `REGAL_BINARY` set.**
|
|
300
|
-
| `rego_parse_ast` | Parse Rego to AST JSON. Wraps `opa parse`.
|
|
301
|
-
| `rego_inspect` | Inspect a bundle or directory: packages, rules, annotations. Wraps `opa inspect`.
|
|
302
|
-
| `rego_capabilities` | List the built-ins and features the resolved `opa` binary understands (`OPA_BINARY`, then `PATH`, then the bundled copy)
|
|
303
|
-
| `rego_deps` | Static dependency analysis: rule-level data references and cross-package calls.
|
|
304
|
-
| `rego_migrate_v1` | Migrate Rego v0 source to v1 syntax. Runs `opa fmt --rego-v1` then validates with `opa check --v1-compatible`. Returns `{ original, migrated, changed, valid, errors }`.
|
|
305
|
-
| `rego_check_schema` | Check Rego against a JSON Schema. Validates that every `input.*` field the policy reads exists in the schema using `opa check --schema`. Accepts inline schema
|
|
307
|
+
| Tool | What it does |
|
|
308
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
309
|
+
| `rego_format` | Format Rego source. Wraps `opa fmt`. Idempotent. |
|
|
310
|
+
| `rego_check` | Type-check and validate Rego. Wraps `opa check`. |
|
|
311
|
+
| `rego_lint` | Run Regal across a file or directory. Returns each violation with its category, level and location. **Requires `regal` on `PATH` or `REGAL_BINARY` set.** |
|
|
312
|
+
| `rego_parse_ast` | Parse Rego to AST JSON. Wraps `opa parse`. |
|
|
313
|
+
| `rego_inspect` | Inspect a bundle or directory: packages, rules, annotations. Wraps `opa inspect`. |
|
|
314
|
+
| `rego_capabilities` | List the built-ins and features the resolved `opa` binary understands (`OPA_BINARY`, then `PATH`, then the bundled copy); `builtins` names up to 100 to return full records for |
|
|
315
|
+
| `rego_deps` | Static dependency analysis: rule-level data references and cross-package calls. |
|
|
316
|
+
| `rego_migrate_v1` | Migrate Rego v0 source to v1 syntax. Runs `opa fmt --rego-v1` then validates with `opa check --v1-compatible`. Returns `{ original, migrated, changed, valid, errors }`. |
|
|
317
|
+
| `rego_check_schema` | Check Rego against a JSON Schema. Validates that every `input.*` field the policy reads exists in the schema using `opa check --schema`. Accepts an inline schema, a path to a JSON Schema file, or a schema directory when the policy declares `schemas:` annotations. |
|
|
306
318
|
|
|
307
319
|
#### Featured: `rego_format`
|
|
308
320
|
|
|
@@ -387,11 +399,11 @@ Run a query against a policy and input. Wrap `opa eval`, `opa test`, and
|
|
|
387
399
|
|
|
388
400
|
Package, sign, and verify deployable bundles. Wrap `opa build`, `opa sign`, and `opa build --verification-key`.
|
|
389
401
|
|
|
390
|
-
| Tool | What it does
|
|
391
|
-
| ------------------- |
|
|
392
|
-
| `opa_bundle_build` | Build a `.tar.gz` bundle from a policy directory. Supports `optimize` and `revision`.
|
|
393
|
-
| `opa_bundle_sign` | Sign a bundle directory in place
|
|
394
|
-
| `opa_bundle_verify` | Verify a signed bundle with a public key through `opa build --verification-key`. Failures name the reason: wrong key, scope, modified, added, missing or unparseable file, unsigned, or a bundle that does not load.
|
|
402
|
+
| Tool | What it does |
|
|
403
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
404
|
+
| `opa_bundle_build` | Build a `.tar.gz` bundle from a policy directory. Supports `optimize` and `revision`. |
|
|
405
|
+
| `opa_bundle_sign` | Sign a bundle directory in place with a private key; an archive is refused, since OPA reads the signature from inside it, and comes signed from `opa_bundle_build`. A directory signature stays valid wherever the directory is placed under the same name. Returns the path, algorithm, and file count. |
|
|
406
|
+
| `opa_bundle_verify` | Verify a signed bundle with a public key through `opa build --verification-key`. Failures name the reason: wrong key, scope, modified, added, missing or unparseable file, unsigned, or a bundle that does not load. |
|
|
395
407
|
|
|
396
408
|
### Category D: OPA server management
|
|
397
409
|
|
|
@@ -419,21 +431,21 @@ point at a reachable server.
|
|
|
419
431
|
The differentiation surface. These compose lower-level primitives into
|
|
420
432
|
the tasks agents are actually asked to do.
|
|
421
433
|
|
|
422
|
-
| Tool | What it does
|
|
423
|
-
| ----------------------------- |
|
|
424
|
-
| `rego_explain_decision` | Turn an evaluation trace into a structured per-rule summary of what fired and what did not
|
|
425
|
-
| `rego_generate_test_skeleton` | Given a policy, generate a `_test.rego` skeleton covering each rule.
|
|
426
|
-
| `rego_describe_policy` | Summarize a policy's package, imports and per-rule structure from its AST. For the input references a policy reads, use `rego_infer_input_schema`
|
|
427
|
-
| `rego_suggest_fix` | For a failed `rego_check` or `rego_lint`, propose
|
|
428
|
-
| `rego_coverage_gaps` | Run `opa test --coverage` and return per-file uncovered line ranges, sorted worst first. Use `threshold` to focus on files below a target percentage.
|
|
429
|
-
| `rego_security_audit` | Run regal lint restricted to `
|
|
430
|
-
| `rego_infer_input_schema` | Statically analyse a policy (or directory of policies) with `opa parse` and return a JSON Schema describing every `input.*` field the policy reads. No running OPA required. Correct starting point for writing integration tests or configuring `opa check --schema`.
|
|
431
|
-
| `rego_fix` | Run `regal fix` to auto-apply mechanical fixes: `opa-fmt`, `use-rego-v1`, `use-assignment-operator`, `no-whitespace-comment`, and `directory-package-mismatch`. Use `dryRun: true` to preview changes first. Returns a per-file breakdown of which rules were applied and, for `directory-package-mismatch`, the new path the file was moved to.
|
|
432
|
-
| `rego_format_write` | Run `opa fmt --write` to canonically format one or more Rego files or directories in place. Use `dryRun: true` to list which files would change without modifying them. Validates all files parse successfully before writing any. Supports `regoV1`, `v0Compatible`, and `v1Compatible` flags. Only requires `opa`.
|
|
433
|
-
| `rego_policy_diff` | Evaluate the same query against two policies in parallel and compare the results. Returns `equal: true/false`, the raw value from each side (`resultA`/`resultB`), and `changedPaths` -- dot/bracket JSON paths that differ. Each side takes inline source or a file/directory path. Useful for verifying refactor equivalence or mapping divergence between two policy versions.
|
|
434
|
-
| `rego_verify` | Formally verify a property about a Rego rule using SMT solving (Microsoft Z3 via WASM). Unlike testing, this checks ALL possible inputs mathematically and either proves the property holds or returns a concrete counterexample.
|
|
435
|
-
| `rego_explain_undefined` | Explain why a Rego query is undefined. Combines a plain eval, a full-trace eval, and per-condition AST analysis to identify the exact body expression blocking each rule. Returns a structured breakdown of which conditions blocked each rule plus a human-readable summary.
|
|
436
|
-
| `rego_playground_share` | Publish a policy (and optional input) as a secret GitHub Gist and return the link, for sharing a reproduction. Requires `GITHUB_TOKEN` with the `gist` scope; returns `GITHUB_TOKEN_MISSING` otherwise.
|
|
434
|
+
| Tool | What it does |
|
|
435
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
436
|
+
| `rego_explain_decision` | Turn an evaluation trace into a structured per-rule summary of what fired and what did not |
|
|
437
|
+
| `rego_generate_test_skeleton` | Given a policy, generate a `_test.rego` skeleton covering each rule. |
|
|
438
|
+
| `rego_describe_policy` | Summarize a policy's package, imports and per-rule structure from its AST. For the input references a policy reads, use `rego_infer_input_schema` |
|
|
439
|
+
| `rego_suggest_fix` | For a failed `rego_check` or `rego_lint`, propose fix suggestions with a confidence level. |
|
|
440
|
+
| `rego_coverage_gaps` | Run `opa test --coverage` and return per-file uncovered line ranges, sorted worst first. Use `threshold` to focus on files below a target percentage. |
|
|
441
|
+
| `rego_security_audit` | Run regal lint restricted to its `bugs` category, plus any custom rules in a `security` category, across a directory. Returns severity-grouped findings with remediation guidance. |
|
|
442
|
+
| `rego_infer_input_schema` | Statically analyse a policy (or directory of policies) with `opa parse` and return a JSON Schema describing every `input.*` field the policy reads. No running OPA required. Correct starting point for writing integration tests or configuring `opa check --schema`. |
|
|
443
|
+
| `rego_fix` | Run `regal fix` to auto-apply mechanical fixes: `opa-fmt`, `use-rego-v1`, `use-assignment-operator`, `no-whitespace-comment`, and `directory-package-mismatch`. Use `dryRun: true` to preview changes first. Returns a per-file breakdown of which rules were applied and, for `directory-package-mismatch`, the new path the file was moved to. |
|
|
444
|
+
| `rego_format_write` | Run `opa fmt --write` to canonically format one or more Rego files or directories in place. Use `dryRun: true` to list which files would change without modifying them. Validates all files parse successfully before writing any. Supports `regoV1`, `v0Compatible`, and `v1Compatible` flags. Only requires `opa`. |
|
|
445
|
+
| `rego_policy_diff` | Evaluate the same query against two policies in parallel and compare the results. Returns `equal: true/false`, the raw value from each side (`resultA`/`resultB`), and `changedPaths` -- dot/bracket JSON paths that differ. Each side takes inline source or a file/directory path. Useful for verifying refactor equivalence or mapping divergence between two policy versions. |
|
|
446
|
+
| `rego_verify` | Formally verify a property about a Rego rule using SMT solving (Microsoft Z3 via WASM). Unlike testing, this checks ALL possible inputs mathematically and either proves the property holds or returns a concrete counterexample. The `kind` field takes `always_true`, `never_true` or `satisfiable`. Handles equality, comparison, string built-ins (`startswith`, `endswith`, `contains`, `regex.match`), multi-clause rules, rule defaults, non-boolean head values, and cross-rule inlining. Reports `INCONCLUSIVE` rather than guessing for negation-as-failure, comprehensions, partial set and object rules, functions, else chains, and complex regex. A body reading an absent field is undefined rather than true, so `always_true` requires the rule to hold for an empty input too. |
|
|
447
|
+
| `rego_explain_undefined` | Explain why a Rego query is undefined. Combines a plain eval, a full-trace eval, and per-condition AST analysis to identify the exact body expression blocking each rule. Returns a structured breakdown of which conditions blocked each rule plus a human-readable summary. |
|
|
448
|
+
| `rego_playground_share` | Publish a policy (and optional input) as a secret GitHub Gist (pass `public: true` to list it) and return the link, for sharing a reproduction. Requires `GITHUB_TOKEN` with the `gist` scope; returns `GITHUB_TOKEN_MISSING` otherwise. |
|
|
437
449
|
|
|
438
450
|
### Category F: Conftest (configuration policy testing)
|
|
439
451
|
|
|
@@ -474,7 +486,14 @@ YAML/JSON/HCL/TOML/INI against Rego policies using
|
|
|
474
486
|
"exceptions": []
|
|
475
487
|
}
|
|
476
488
|
],
|
|
477
|
-
"summary": {
|
|
489
|
+
"summary": {
|
|
490
|
+
"passed": 0,
|
|
491
|
+
"failed": 1,
|
|
492
|
+
"warnings": 0,
|
|
493
|
+
"skipped": 0,
|
|
494
|
+
"successes": 0,
|
|
495
|
+
"failures": 1
|
|
496
|
+
}
|
|
478
497
|
}
|
|
479
498
|
}
|
|
480
499
|
```
|
|
@@ -568,10 +587,12 @@ Agent: Done. Policy `rbac` is live on staging at $OPA_URL.
|
|
|
568
587
|
│ ├── tools/bundles/ ─┼─── lib/opa-cli.ts ──┐ │
|
|
569
588
|
│ ├── tools/server-management/ ─┤ │ │
|
|
570
589
|
│ ├── tools/helpers/ ─┤ │ │
|
|
590
|
+
│ ├── tools/conftest/ ─┤ │ │
|
|
571
591
|
│ ├── tools/meta/ ─┘ │ │
|
|
572
592
|
│ │ ▼ │
|
|
573
593
|
│ │ lib/subprocess.ts ──┴── opa │
|
|
574
594
|
│ │ lib/regal-cli.ts ───── regal│
|
|
595
|
+
│ │ lib/conftest-cli.ts ─ conftest│
|
|
575
596
|
│ │ lib/opa-client.ts ───── HTTP │
|
|
576
597
|
│ │ │
|
|
577
598
|
│ └── lib/output.ts (envelope + truncation) │
|
|
@@ -586,12 +607,16 @@ Four things worth knowing if you're going to operate this:
|
|
|
586
607
|
1. **stdout is the protocol channel.** The server logs to a file via
|
|
587
608
|
`lib/logger.ts` and never writes to stdout. If you see stray stdout
|
|
588
609
|
bytes, the client disconnects; the MCP transport layer is strict.
|
|
589
|
-
2. **No tool throws.** Every
|
|
590
|
-
a structured `{ ok: false, error: ... }` envelope
|
|
591
|
-
stable error vocabulary, not a stack trace.
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
610
|
+
2. **No tool handler throws.** Every handler catches its own exceptions and
|
|
611
|
+
returns a structured `{ ok: false, error: ... }` envelope, so the agent
|
|
612
|
+
sees a stable error vocabulary, not a stack trace. An argument that fails
|
|
613
|
+
the tool's input schema never reaches the handler: the MCP layer rejects
|
|
614
|
+
it and returns a tool result with `isError: true` whose text begins
|
|
615
|
+
`MCP error -32602: Input validation error:`, rather than the envelope.
|
|
616
|
+
Decoding subprocess output happens inside an async callback, where a throw
|
|
617
|
+
would bypass those handlers entirely, so that path is bounded by bytes
|
|
618
|
+
rather than left to a `try`/`catch` that could not see it.
|
|
619
|
+
|
|
595
620
|
3. **Subprocesses are bounded in time, size, and environment.**
|
|
596
621
|
`lib/subprocess.ts` runs the binaries with `shell: false`, a hard
|
|
597
622
|
timeout with `SIGTERM`-then-`SIGKILL` escalation, and a per-stream byte
|
|
@@ -629,9 +654,23 @@ be exposed on the network.
|
|
|
629
654
|
`OPA_MCP_PASSTHROUGH_ENV` opts individual variables back in.
|
|
630
655
|
- `OPA_TOKEN` is never echoed in tool responses or log entries, and is not
|
|
631
656
|
passed to any child process.
|
|
657
|
+
- **Tools that evaluate Rego are annotated open-world and not read-only.**
|
|
658
|
+
`rego_eval` and its variants, `rego_test`, `rego_test_multiroot`,
|
|
659
|
+
`rego_bench`, `rego_compile_query`, `opa_exec`, the explain, diff and
|
|
660
|
+
coverage helpers, the conftest tools, and the Regal tools (`rego_lint`,
|
|
661
|
+
`rego_security_audit`, `rego_fix`, which run a project's custom rules) all
|
|
662
|
+
run Rego, and OPA's `http.send` lets a policy reach, and write to, any
|
|
663
|
+
network address. A client that gates on the hints will ask before running
|
|
664
|
+
one. `opa_query_decision` and `opa_compile_query` are the exception: the
|
|
665
|
+
remote OPA evaluates a policy it already holds, and their hints describe
|
|
666
|
+
what the call does to that server. No evaluating tool passes or accepts a
|
|
667
|
+
capabilities file, so `http.send` cannot be restricted for evaluation;
|
|
668
|
+
`rego_check` and `opa_bundle_build` accept one, which affects only checking
|
|
669
|
+
and building.
|
|
632
670
|
- Releases are published with
|
|
633
671
|
[npm provenance](https://docs.npmjs.com/generating-provenance-statements);
|
|
634
|
-
the Docker image is built
|
|
672
|
+
the Docker image is built from the committed `Dockerfile`, with pinned
|
|
673
|
+
versions of `opa` and `regal` checked against their published digests.
|
|
635
674
|
|
|
636
675
|
To report a vulnerability, follow [SECURITY.md](./SECURITY.md). **Please
|
|
637
676
|
do not open a public issue for security problems.**
|
|
@@ -694,6 +733,13 @@ path(s) you want the server to read from, comma-separated.
|
|
|
694
733
|
`OPA_URL` (default `http://localhost:8181`) must point at a running OPA
|
|
695
734
|
server (`opa run --server ...`). Check with `curl $OPA_URL/health`.
|
|
696
735
|
|
|
736
|
+
**`TIMEOUT` when calling `opa_*` tools.**
|
|
737
|
+
|
|
738
|
+
The request did not finish within `OPA_MCP_HTTP_TIMEOUT_MS` (default 15 s).
|
|
739
|
+
Either OPA is up but slow, or nothing is answering at `OPA_URL` and the
|
|
740
|
+
connection attempt is being dropped rather than refused, which looks the
|
|
741
|
+
same from here. Check `OPA_URL` and the server's load, or raise the limit.
|
|
742
|
+
|
|
697
743
|
**`directory-package-mismatch` violation when linting inline source.**
|
|
698
744
|
|
|
699
745
|
Since v0.1.1, the server auto-disables this rule for inline-source calls.
|
|
@@ -730,7 +776,8 @@ npm run build # compile to dist/
|
|
|
730
776
|
|
|
731
777
|
CI runs lint, typecheck, build, and unit tests on every push and PR
|
|
732
778
|
across Ubuntu and Windows on Node 20, 22 and 24, plus macOS on Node 22. Integration
|
|
733
|
-
tests run on Linux
|
|
779
|
+
tests run on Linux, and on Windows as a non-required check, against pinned
|
|
780
|
+
`opa`, `regal` and `conftest` releases.
|
|
734
781
|
|
|
735
782
|
For the full contributor workflow (adding tools, naming conventions,
|
|
736
783
|
logging discipline, release process), see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiC1C,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiC1C,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAuD/C;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,CAgBxE;AAID,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAMA"}
|
package/dist/cli.js
CHANGED
|
@@ -41,6 +41,7 @@ export function formatHelp(col) {
|
|
|
41
41
|
['OPA_MCP_MAX_RESPONSE_BYTES', 'max response size in bytes', '100000'],
|
|
42
42
|
['OPA_MCP_MAX_SUBPROCESS_BYTES', 'max bytes captured per stream', '33554432'],
|
|
43
43
|
['OPA_MCP_PASSTHROUGH_ENV', 'extra env names to pass to child processes', ''],
|
|
44
|
+
['OPA_MCP_BLOCK_ENV', 'env names withheld from child processes', ''],
|
|
44
45
|
['OPA_MCP_NO_TELEMETRY', 'set to 1 to disable the anonymous startup ping', ''],
|
|
45
46
|
];
|
|
46
47
|
// Pad the name to 30 and the description to 40 so the default column lines
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,iFAAiF;AAEjF,MAAM,CAAC,GAAG,SAAS,CAAC;AACpB,MAAM,CAAC,GAAG,SAAS,CAAC;AACpB,MAAM,CAAC,GAAG,SAAS,CAAC;AACpB,MAAM,EAAE,GAAG,UAAU,CAAC;AAEtB,SAAS,CAAC,CAAC,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