@orygn/opa-mcp 0.4.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 +583 -4
- package/README.md +144 -98
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -3
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +14 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +91 -19
- 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/bundle-signatures.d.ts +23 -0
- package/dist/lib/bundle-signatures.d.ts.map +1 -0
- package/dist/lib/bundle-signatures.js +152 -0
- package/dist/lib/bundle-signatures.js.map +1 -0
- package/dist/lib/child-env.d.ts +9 -2
- package/dist/lib/child-env.d.ts.map +1 -1
- package/dist/lib/child-env.js +38 -6
- package/dist/lib/child-env.js.map +1 -1
- package/dist/lib/conftest-cli.d.ts +25 -10
- package/dist/lib/conftest-cli.d.ts.map +1 -1
- package/dist/lib/conftest-cli.js +233 -50
- 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/install-id.d.ts.map +1 -1
- package/dist/lib/install-id.js +18 -3
- package/dist/lib/install-id.js.map +1 -1
- package/dist/lib/json-stream.d.ts +26 -0
- package/dist/lib/json-stream.d.ts.map +1 -0
- package/dist/lib/json-stream.js +69 -0
- package/dist/lib/json-stream.js.map +1 -0
- package/dist/lib/opa-cli.d.ts +74 -16
- package/dist/lib/opa-cli.d.ts.map +1 -1
- package/dist/lib/opa-cli.js +107 -30
- 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 +34 -0
- package/dist/lib/opa-paths.d.ts.map +1 -0
- package/dist/lib/opa-paths.js +101 -0
- package/dist/lib/opa-paths.js.map +1 -0
- 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/regal-cli.d.ts +16 -1
- package/dist/lib/regal-cli.d.ts.map +1 -1
- package/dist/lib/regal-cli.js +40 -6
- package/dist/lib/regal-cli.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 +181 -55
- package/dist/lib/rego-ast-walker.js.map +1 -1
- package/dist/lib/rego-counterexample.d.ts +15 -2
- package/dist/lib/rego-counterexample.d.ts.map +1 -1
- package/dist/lib/rego-counterexample.js +63 -15
- 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 +34 -3
- package/dist/lib/rego-ir.d.ts.map +1 -1
- package/dist/lib/rego-smt-encoder.d.ts +88 -5
- package/dist/lib/rego-smt-encoder.d.ts.map +1 -1
- package/dist/lib/rego-smt-encoder.js +270 -31
- package/dist/lib/rego-smt-encoder.js.map +1 -1
- package/dist/lib/rego-type-inferencer.d.ts +27 -2
- package/dist/lib/rego-type-inferencer.d.ts.map +1 -1
- package/dist/lib/rego-type-inferencer.js +71 -3
- 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 +203 -90
- package/dist/lib/rego-verify-engine.js.map +1 -1
- package/dist/lib/rego-z3.d.ts +66 -0
- package/dist/lib/rego-z3.d.ts.map +1 -1
- package/dist/lib/rego-z3.js +312 -5
- package/dist/lib/rego-z3.js.map +1 -1
- package/dist/lib/security.d.ts +8 -0
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +130 -54
- package/dist/lib/security.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 +42 -15
- 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 +50 -7
- 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/build.d.ts.map +1 -1
- package/dist/tools/bundles/build.js +12 -4
- package/dist/tools/bundles/build.js.map +1 -1
- package/dist/tools/bundles/sign.d.ts +9 -2
- package/dist/tools/bundles/sign.d.ts.map +1 -1
- package/dist/tools/bundles/sign.js +125 -19
- package/dist/tools/bundles/sign.js.map +1 -1
- package/dist/tools/bundles/verify.d.ts +1 -1
- package/dist/tools/bundles/verify.d.ts.map +1 -1
- package/dist/tools/bundles/verify.js +58 -19
- package/dist/tools/bundles/verify.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/pull.d.ts.map +1 -1
- package/dist/tools/conftest/pull.js +24 -10
- package/dist/tools/conftest/pull.js.map +1 -1
- package/dist/tools/conftest/push.d.ts.map +1 -1
- package/dist/tools/conftest/push.js +17 -7
- package/dist/tools/conftest/push.js.map +1 -1
- package/dist/tools/conftest/test.d.ts +10 -6
- package/dist/tools/conftest/test.d.ts.map +1 -1
- package/dist/tools/conftest/test.js +61 -39
- package/dist/tools/conftest/test.js.map +1 -1
- package/dist/tools/conftest/verify.d.ts +10 -6
- package/dist/tools/conftest/verify.d.ts.map +1 -1
- package/dist/tools/conftest/verify.js +40 -32
- 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 +29 -2
- package/dist/tools/evaluation/bench.d.ts.map +1 -1
- package/dist/tools/evaluation/bench.js +53 -9
- 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 +16 -0
- package/dist/tools/evaluation/exec.d.ts.map +1 -1
- package/dist/tools/evaluation/exec.js +38 -6
- package/dist/tools/evaluation/exec.js.map +1 -1
- package/dist/tools/evaluation/test-multiroot.d.ts +6 -0
- package/dist/tools/evaluation/test-multiroot.d.ts.map +1 -1
- package/dist/tools/evaluation/test-multiroot.js +35 -8
- package/dist/tools/evaluation/test-multiroot.js.map +1 -1
- package/dist/tools/evaluation/test.d.ts +45 -0
- package/dist/tools/evaluation/test.d.ts.map +1 -1
- package/dist/tools/evaluation/test.js +153 -32
- package/dist/tools/evaluation/test.js.map +1 -1
- package/dist/tools/helpers/coverage-gaps.d.ts +11 -3
- package/dist/tools/helpers/coverage-gaps.d.ts.map +1 -1
- package/dist/tools/helpers/coverage-gaps.js +7 -7
- 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 +9 -3
- package/dist/tools/helpers/explain-undefined.d.ts.map +1 -1
- package/dist/tools/helpers/explain-undefined.js +214 -73
- 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/helpers/verify.d.ts.map +1 -1
- package/dist/tools/helpers/verify.js +5 -1
- package/dist/tools/helpers/verify.js.map +1 -1
- package/dist/tools/meta/index.d.ts +1 -1
- package/dist/tools/server-management/_shared.d.ts +15 -4
- package/dist/tools/server-management/_shared.d.ts.map +1 -1
- package/dist/tools/server-management/_shared.js +86 -13
- package/dist/tools/server-management/_shared.js.map +1 -1
- package/dist/tools/server-management/data.d.ts.map +1 -1
- package/dist/tools/server-management/data.js +88 -23
- package/dist/tools/server-management/data.js.map +1 -1
- package/dist/tools/server-management/decisions.d.ts.map +1 -1
- package/dist/tools/server-management/decisions.js +16 -3
- package/dist/tools/server-management/decisions.js.map +1 -1
- package/dist/tools/server-management/policies.d.ts.map +1 -1
- package/dist/tools/server-management/policies.js +44 -7
- package/dist/tools/server-management/policies.js.map +1 -1
- package/dist/tools/server-management/status.d.ts.map +1 -1
- package/dist/tools/server-management/status.js +80 -13
- package/dist/tools/server-management/status.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +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
|
|
@@ -76,7 +83,7 @@ Once an MCP client is connected, an agent can:
|
|
|
76
83
|
deployable bundle, optionally signing it. Output is a regular `.tar.gz`
|
|
77
84
|
the agent can hand to your delivery system.
|
|
78
85
|
- **Lint.** `rego_lint` runs Regal across a directory or a single file
|
|
79
|
-
and returns
|
|
86
|
+
and returns each finding with its category, level and location.
|
|
80
87
|
|
|
81
88
|
A walk-through of a typical session lives in [Cookbook](#cookbook).
|
|
82
89
|
|
|
@@ -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
|
|
@@ -237,7 +248,8 @@ Get-Command opa, regal | Select-Object Source # Windows
|
|
|
237
248
|
|
|
238
249
|
This does not affect the **Docker** install path, which ships `opa` and
|
|
239
250
|
`regal` in the image and bypasses `PATH` entirely. The **MCPB** bundle
|
|
240
|
-
carries neither and
|
|
251
|
+
carries neither, and unlike the npm install has no bundled fallback: set
|
|
252
|
+
`OPA_BINARY` or put `opa` on `PATH`.
|
|
241
253
|
See [Troubleshooting](#troubleshooting) for full detail.
|
|
242
254
|
|
|
243
255
|
## Configuration
|
|
@@ -256,16 +268,18 @@ variable is optional; defaults are sensible for a local OPA on
|
|
|
256
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.** |
|
|
257
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. |
|
|
258
270
|
| `OPA_MCP_LOG_LEVEL` | `info` | One of `debug`, `info`, `warn`, `error`. |
|
|
259
|
-
| `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. |
|
|
260
272
|
| `OPA_MCP_TIMEOUT_MS` | `30000` | Hard timeout for any spawned subprocess (`opa`, `regal`). After this, the child gets `SIGTERM` and then `SIGKILL`. |
|
|
261
|
-
| `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`. |
|
|
262
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. |
|
|
263
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. |
|
|
264
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. |
|
|
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. |
|
|
265
278
|
|
|
266
|
-
Paths in `OPA_MCP_ALLOWED_PATHS` and
|
|
267
|
-
|
|
268
|
-
|
|
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.
|
|
269
283
|
|
|
270
284
|
## Tool reference
|
|
271
285
|
|
|
@@ -278,12 +292,10 @@ Every tool returns a JSON envelope:
|
|
|
278
292
|
|
|
279
293
|
Stable error codes: `INVALID_INPUT`, `INVALID_REGO`, `INVALID_BUNDLE`,
|
|
280
294
|
`EVAL_ERROR`, `OPA_BINARY_NOT_FOUND`, `REGAL_NOT_FOUND`,
|
|
281
|
-
`
|
|
282
|
-
`
|
|
283
|
-
`
|
|
284
|
-
`
|
|
285
|
-
`Z3_INIT_ERROR`, `GITHUB_TOKEN_MISSING`, `GIST_CREATE_FAILED`,
|
|
286
|
-
`OUTPUT_TOO_LARGE`, `TIMEOUT`,
|
|
295
|
+
`CONFTEST_NOT_FOUND`, `OPA_UNREACHABLE`, `OPA_AUTH_FAILED`,
|
|
296
|
+
`POLICY_NOT_FOUND`, `DATA_NOT_FOUND`, `PATH_NOT_ALLOWED`, `PATH_NOT_FOUND`,
|
|
297
|
+
`NO_TESTS_FOUND`, `COVERAGE_BELOW_THRESHOLD`, `OPA_VERSION_UNSUPPORTED`,
|
|
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
|
|
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` |
|
|
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
|
|
|
@@ -352,17 +364,17 @@ Operate on Rego source code without needing a running OPA server. Wrap
|
|
|
352
364
|
Run a query against a policy and input. Wrap `opa eval`, `opa test`, and
|
|
353
365
|
`opa bench`.
|
|
354
366
|
|
|
355
|
-
| Tool | What it does
|
|
356
|
-
| ------------------------- |
|
|
357
|
-
| `rego_eval` | Evaluate a query against a policy and input. The bread-and-butter tool.
|
|
358
|
-
| `rego_eval_with_explain` | Evaluate with `--explain=full` and return a structured trace.
|
|
359
|
-
| `rego_eval_with_profile` | Evaluate with `--profile` and return per-rule timing and evaluation counts.
|
|
360
|
-
| `rego_eval_with_coverage` | Evaluate with `--coverage` and return per-line coverage.
|
|
361
|
-
| `rego_test` | Run `opa test`
|
|
362
|
-
| `rego_bench` | Run `opa bench` and return statistical timing data.
|
|
363
|
-
| `rego_compile_query` | Partially evaluate a query against a policy.
|
|
364
|
-
| `opa_exec` | Batch-evaluate a decision against multiple input files. Returns per-file results with `successCount` and `errorCount`.
|
|
365
|
-
| `rego_test_multiroot` | Run
|
|
367
|
+
| Tool | What it does |
|
|
368
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
369
|
+
| `rego_eval` | Evaluate a query against a policy and input. The bread-and-butter tool. |
|
|
370
|
+
| `rego_eval_with_explain` | Evaluate with `--explain=full` and return a structured trace. |
|
|
371
|
+
| `rego_eval_with_profile` | Evaluate with `--profile` and return per-rule timing and evaluation counts. |
|
|
372
|
+
| `rego_eval_with_coverage` | Evaluate with `--coverage` and return per-line coverage. |
|
|
373
|
+
| `rego_test` | Run Rego unit tests with `opa test`. Returns pass, fail, skip and error counts plus per-test records; `errored` counts tests OPA could not evaluate. With `coverage` or `threshold` OPA emits a coverage report instead of per-test records. |
|
|
374
|
+
| `rego_bench` | Run `opa bench` and return statistical timing data. |
|
|
375
|
+
| `rego_compile_query` | Partially evaluate a query against a policy. |
|
|
376
|
+
| `opa_exec` | Batch-evaluate a decision against multiple input files. Returns per-file results with `successCount` and `errorCount`. |
|
|
377
|
+
| `rego_test_multiroot` | Run `opa test` once per root and aggregate. Use when `opa test .` hits package conflicts. Totals include `totalErrored`. |
|
|
366
378
|
|
|
367
379
|
#### Featured: `rego_eval`
|
|
368
380
|
|
|
@@ -385,55 +397,55 @@ Run a query against a policy and input. Wrap `opa eval`, `opa test`, and
|
|
|
385
397
|
|
|
386
398
|
### Category C: Bundle operations
|
|
387
399
|
|
|
388
|
-
Package and
|
|
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 with a private key. Returns
|
|
394
|
-
| `opa_bundle_verify` | Verify
|
|
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
|
|
|
398
410
|
Talk to a running OPA server over its REST API. Require `OPA_URL` to
|
|
399
411
|
point at a reachable server.
|
|
400
412
|
|
|
401
|
-
| Tool | What it does
|
|
402
|
-
| -------------------- |
|
|
403
|
-
| `opa_list_policies` | List
|
|
404
|
-
| `opa_get_policy` | Get a single policy by ID.
|
|
405
|
-
| `opa_put_policy` | Upload or replace a policy.
|
|
406
|
-
| `opa_delete_policy` | Delete a policy by ID.
|
|
407
|
-
| `opa_get_data` | Read a path from the data hierarchy.
|
|
408
|
-
| `opa_put_data` | Write to a path in the data hierarchy.
|
|
409
|
-
| `opa_patch_data` | Apply a JSON Patch to the data hierarchy.
|
|
410
|
-
| `opa_delete_data` | Delete a document from the data hierarchy.
|
|
411
|
-
| `opa_query_decision` | POST to a `/v1/data/...` decision endpoint with input.
|
|
412
|
-
| `opa_compile_query` | Partially evaluate a query against the running server.
|
|
413
|
-
| `opa_health` | Liveness / readiness check.
|
|
414
|
-
| `opa_status` |
|
|
415
|
-
| `opa_config` | Server configuration
|
|
413
|
+
| Tool | What it does |
|
|
414
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
415
|
+
| `opa_list_policies` | List the policy IDs registered on the server, with a count. `includeSource` and `includeAst` add the Rego text or the parsed AST. |
|
|
416
|
+
| `opa_get_policy` | Get a single policy by ID. Returns the Rego source; `includeAst` adds OPA's parsed AST. |
|
|
417
|
+
| `opa_put_policy` | Upload or replace a policy. |
|
|
418
|
+
| `opa_delete_policy` | Delete a policy by ID. |
|
|
419
|
+
| `opa_get_data` | Read a path from the data hierarchy. |
|
|
420
|
+
| `opa_put_data` | Write to a path in the data hierarchy. |
|
|
421
|
+
| `opa_patch_data` | Apply a JSON Patch to the data hierarchy. |
|
|
422
|
+
| `opa_delete_data` | Delete a document from the data hierarchy. |
|
|
423
|
+
| `opa_query_decision` | POST to a `/v1/data/...` decision endpoint with input. |
|
|
424
|
+
| `opa_compile_query` | Partially evaluate a query against the running server. |
|
|
425
|
+
| `opa_health` | Liveness / readiness check. A server that answers reports `healthy: true` or `healthy: false` with OPA's reason; `OPA_UNREACHABLE` means it could not be reached at all. |
|
|
426
|
+
| `opa_status` | The same `GET /v1/config` document as `opa_config`, under a `status` key. Bundle and decision-log status (`/v1/status`) is not exposed. Service header values are redacted. |
|
|
427
|
+
| `opa_config` | Server configuration from `GET /v1/config`. OPA drops the `credentials` block but returns service headers verbatim, so header values are redacted here and the names kept. |
|
|
416
428
|
|
|
417
429
|
### Category E: Higher-level helpers
|
|
418
430
|
|
|
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` |
|
|
425
|
-
| `rego_generate_test_skeleton` | Given a policy, generate a `_test.rego` skeleton covering each rule.
|
|
426
|
-
| `rego_describe_policy` | Summarize
|
|
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
|
|
|
@@ -442,12 +454,12 @@ YAML/JSON/HCL/TOML/INI against Rego policies using
|
|
|
442
454
|
[conftest](https://www.conftest.dev/). Requires `conftest` on `PATH` or
|
|
443
455
|
`CONFTEST_BINARY` set; all four tools return `CONFTEST_NOT_FOUND` otherwise.
|
|
444
456
|
|
|
445
|
-
| Tool | What it does
|
|
446
|
-
| ----------------- |
|
|
447
|
-
| `conftest_test` | Evaluate
|
|
448
|
-
| `conftest_verify` | Run `test_*` rules
|
|
449
|
-
| `conftest_pull` | Pull a policy bundle from an OCI registry or Git repo into a local directory with `conftest pull`. The target directory need not exist; conftest creates it.
|
|
450
|
-
| `conftest_push` | Package a local policy directory as an OCI artifact and push to a registry with `conftest push`. Registry credentials come from the host environment (`docker login`, ORAS keychain, etc.) -- credentials are never passed through tools.
|
|
457
|
+
| Tool | What it does |
|
|
458
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
459
|
+
| `conftest_test` | Evaluate config files or an inline document against Rego policies with `conftest test`. Per-file, per-namespace results with arrays always present, and a summary that counts files by name. Parser names are a closed set. |
|
|
460
|
+
| `conftest_verify` | Run the `test_*` rules in a conftest policy directory with `conftest verify`. Reports per-rule results and `NO_TESTS_FOUND` when there are none. |
|
|
461
|
+
| `conftest_pull` | Pull a policy bundle from an OCI registry or Git repo into a local directory with `conftest pull`. The target directory need not exist; conftest creates it, and empties it first, so do not point it at one holding anything else. Omitting `policy` uses the conftest default, which must itself sit inside an allowed root. |
|
|
462
|
+
| `conftest_push` | Package a local policy directory as an OCI artifact and push to a registry with `conftest push`. Registry credentials come from the host environment (`docker login`, ORAS keychain, etc.) -- credentials are never passed through tools. |
|
|
451
463
|
|
|
452
464
|
#### Featured: `conftest_test` with inline config
|
|
453
465
|
|
|
@@ -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
|
|
@@ -602,7 +627,8 @@ Four things worth knowing if you're going to operate this:
|
|
|
602
627
|
4. **Children do not inherit the server's environment.** `lib/child-env.ts`
|
|
603
628
|
builds an explicit allow-list instead. Rego can read its interpreter's
|
|
604
629
|
environment through `opa.runtime().env`, so anything passed down is
|
|
605
|
-
readable by any policy the server evaluates
|
|
630
|
+
readable by any policy the server evaluates, the proxy variables on the
|
|
631
|
+
list included.
|
|
606
632
|
|
|
607
633
|
## Security
|
|
608
634
|
|
|
@@ -620,13 +646,31 @@ be exposed on the network.
|
|
|
620
646
|
other variable to any policy it evaluated. Since `rego_eval` accepts inline
|
|
621
647
|
source, no filesystem access is needed to reach that, which puts it one
|
|
622
648
|
prompt injection away from any untrusted Rego an agent reads. Children get an
|
|
623
|
-
explicit allow-list instead (`lib/child-env.ts`)
|
|
649
|
+
explicit allow-list instead (`lib/child-env.ts`). The list holds no cloud or
|
|
650
|
+
repository token, but it is not free of credentials: `HTTP_PROXY` and its
|
|
651
|
+
siblings are on it, and a proxy URL can embed a username and password.
|
|
652
|
+
They are there because dropping them breaks everyone behind a corporate
|
|
653
|
+
proxy. Name them in `OPA_MCP_BLOCK_ENV` to withhold them anyway.
|
|
624
654
|
`OPA_MCP_PASSTHROUGH_ENV` opts individual variables back in.
|
|
625
655
|
- `OPA_TOKEN` is never echoed in tool responses or log entries, and is not
|
|
626
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.
|
|
627
670
|
- Releases are published with
|
|
628
671
|
[npm provenance](https://docs.npmjs.com/generating-provenance-statements);
|
|
629
|
-
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.
|
|
630
674
|
|
|
631
675
|
To report a vulnerability, follow [SECURITY.md](./SECURITY.md). **Please
|
|
632
676
|
do not open a public issue for security problems.**
|
|
@@ -689,11 +733,12 @@ path(s) you want the server to read from, comma-separated.
|
|
|
689
733
|
`OPA_URL` (default `http://localhost:8181`) must point at a running OPA
|
|
690
734
|
server (`opa run --server ...`). Check with `curl $OPA_URL/health`.
|
|
691
735
|
|
|
692
|
-
|
|
736
|
+
**`TIMEOUT` when calling `opa_*` tools.**
|
|
693
737
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
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.
|
|
697
742
|
|
|
698
743
|
**`directory-package-mismatch` violation when linting inline source.**
|
|
699
744
|
|
|
@@ -730,8 +775,9 @@ npm run build # compile to dist/
|
|
|
730
775
|
```
|
|
731
776
|
|
|
732
777
|
CI runs lint, typecheck, build, and unit tests on every push and PR
|
|
733
|
-
across Ubuntu
|
|
734
|
-
tests run on Linux
|
|
778
|
+
across Ubuntu and Windows on Node 20, 22 and 24, plus macOS on Node 22. Integration
|
|
779
|
+
tests run on Linux, and on Windows as a non-required check, against pinned
|
|
780
|
+
`opa`, `regal` and `conftest` releases.
|
|
735
781
|
|
|
736
782
|
For the full contributor workflow (adding tools, naming conventions,
|
|
737
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
|
@@ -39,12 +39,18 @@ export function formatHelp(col) {
|
|
|
39
39
|
['OPA_MCP_LOG_FILE', 'log file path', '<tmpdir>/orygn-opa-mcp.log'],
|
|
40
40
|
['OPA_MCP_LOG_LEVEL', 'log level (debug|info|warn|error)', 'info'],
|
|
41
41
|
['OPA_MCP_MAX_RESPONSE_BYTES', 'max response size in bytes', '100000'],
|
|
42
|
+
['OPA_MCP_MAX_SUBPROCESS_BYTES', 'max bytes captured per stream', '33554432'],
|
|
43
|
+
['OPA_MCP_PASSTHROUGH_ENV', 'extra env names to pass to child processes', ''],
|
|
44
|
+
['OPA_MCP_BLOCK_ENV', 'env names withheld from child processes', ''],
|
|
45
|
+
['OPA_MCP_NO_TELEMETRY', 'set to 1 to disable the anonymous startup ping', ''],
|
|
42
46
|
];
|
|
43
|
-
// Pad name to
|
|
47
|
+
// Pad the name to 30 and the description to 40 so the default column lines
|
|
48
|
+
// up. The widest entries are OPA_MCP_MAX_SUBPROCESS_BYTES (28) and its
|
|
49
|
+
// description (39).
|
|
44
50
|
const envLines = rows
|
|
45
51
|
.map(([name, desc, def]) => {
|
|
46
|
-
const namePad = name.padEnd(
|
|
47
|
-
const descPad = desc.padEnd(
|
|
52
|
+
const namePad = name.padEnd(30);
|
|
53
|
+
const descPad = desc.padEnd(40);
|
|
48
54
|
const defStr = def ? `${d('default: ' + def)}` : '';
|
|
49
55
|
return ` ${namePad}${descPad}${defStr}`;
|
|
50
56
|
})
|
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,EAAW,EAAE,GAAG,KAAe;IACxC,OAAO,EAAE,CAAC,CAAC,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C;IACvE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACpC,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a `*_BINARY` value is acceptable on `platform`: a bare command
|
|
4
|
+
* name, looked up on PATH by the spawn, or an absolute path. A relative path
|
|
5
|
+
* would resolve against wherever the client happened to launch the server.
|
|
6
|
+
* On Windows a path with a leading separator and no drive counts as absolute
|
|
7
|
+
* to `isAbsolute`, yet it resolves against the current drive, the same hazard
|
|
8
|
+
* as the drive-relative `C:regal.exe`; a UNC path starts with two separators
|
|
9
|
+
* and is fine.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isBinarySpec(value: string, platform?: NodeJS.Platform): boolean;
|
|
2
12
|
declare const ConfigSchema: z.ZodObject<{
|
|
3
13
|
/** Base URL of a running OPA server (used by `opa_*` runtime tools). */
|
|
4
14
|
opaUrl: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
5
15
|
/** Optional bearer token for OPA running with `--authentication=token`. */
|
|
6
16
|
opaToken: z.ZodOptional<z.ZodString>;
|
|
7
17
|
/** Path to the `opa` binary. Defaults to `opa` on PATH. */
|
|
8
|
-
opaBinary: z.ZodDefault<z.ZodString
|
|
18
|
+
opaBinary: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
9
19
|
/** Path to the `regal` binary. Defaults to `regal` on PATH. */
|
|
10
|
-
regalBinary: z.ZodDefault<z.ZodString
|
|
20
|
+
regalBinary: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
11
21
|
/** Path to the `conftest` binary. Defaults to `conftest` on PATH. */
|
|
12
|
-
conftestBinary: z.ZodDefault<z.ZodString
|
|
22
|
+
conftestBinary: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
13
23
|
/** Hard timeout in ms for any spawned subprocess (opa, regal). */
|
|
14
24
|
subprocessTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
15
25
|
/** HTTP request timeout for OPA REST API calls. */
|
|
@@ -20,7 +30,7 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
20
30
|
* default -- file-based tools refuse to read from disk until the
|
|
21
31
|
* operator explicitly opts in via `OPA_MCP_ALLOWED_PATHS`.
|
|
22
32
|
*/
|
|
23
|
-
allowedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
33
|
+
allowedPaths: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
24
34
|
/** Path to the log file. Defaults to OS tmpdir + orygn-opa-mcp.log. */
|
|
25
35
|
logFile: z.ZodDefault<z.ZodString>;
|
|
26
36
|
/** Log level for the file logger. */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,OAAO,CAKjG;AAmBD,QAAA,MAAM,YAAY;IAChB,wEAAwE;;IASxE,2EAA2E;;IAG3E,2DAA2D;;IAG3D,+DAA+D;;IAG/D,qEAAqE;;IAGrE,kEAAkE;;IAQlE,mDAAmD;;IAQnD;;;;;OAKG;;IAcH,uEAAuE;;IAGvE,qCAAqC;;IAGrC;;;;OAIG;;IASH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUH,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAyClD,wBAAgB,UAAU,IAAI,MAAM,CAsCnC"}
|