@decionis/mcp 0.1.2 → 0.1.4

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.
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "decionis",
3
+ "displayName": "Decionis Execution Authority",
4
+ "version": "0.1.4",
5
+ "description": "Refuse an agent's tool call before it runs, using a policy you wrote. Evaluated locally through the real Decionis protocol evaluator \u2014 no account, no network, no credentials.",
6
+ "keywords": ["security", "policy", "guardrails", "execution-authority", "agent-safety", "hooks"],
7
+ "homepage": "https://decionis.com/docs/protocol-mcp",
8
+ "repository": "https://github.com/decionis/mcp",
9
+ "license": "SEE LICENSE IN LICENSE",
10
+ "author": {
11
+ "name": "Decionis, Inc.",
12
+ "url": "https://decionis.com"
13
+ },
14
+ "commands": ["./commands"]
15
+ }
package/README.md CHANGED
@@ -27,17 +27,79 @@ surface.
27
27
 
28
28
  ## Tools
29
29
 
30
- | Tool | Purpose |
31
- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
32
- | `decionis_read_policy` | Path, sha256, and compiled rules (or compile errors) of the repo's `DECIONIS_POLICY.md`. |
33
- | `decionis_evaluate` | Evaluate a candidate action payload against the policy through the real evaluator; returns the verdict + matched rule. |
34
- | `decionis_verdict_help` | The verdict vocabulary, rules-block grammar, and how an agent should behave on each verdict. |
30
+ | Tool | Purpose |
31
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32
+ | `decionis_read_policy` | Path, sha256, and compiled rules (or compile errors) of the repo's `DECIONIS_POLICY.md`. |
33
+ | `decionis_evaluate` | Evaluate a candidate action payload against the policy through the real evaluator; returns the verdict + matched rule. |
34
+ | `decionis_demo` | The one-minute demo: four canned intents through the real evaluator with a built-in sample policy — one per wire outcome. No account, no key, no policy file, no network, nothing recorded. |
35
+ | `decionis_verdict_help` | The verdict vocabulary, rules-block grammar, and how an agent should behave on each verdict. |
36
+
37
+ All four are read-only, credential-free, and networkless (`readOnlyHint: true`,
38
+ `openWorldHint: false`) — an agent host that gates side-effectful tools behind
39
+ approval has nothing to gate here. The `shield.*` tools register only when
40
+ `DECIONIS_SHIELD_API_KEY` and `DECIONIS_SHIELD_APP_ID` are configured.
41
+
42
+ ### Kubernetes execution-authority tools
43
+
44
+ The optional Kubernetes tools add a client-side gate while the validating admission
45
+ webhook remains the independent cluster-side gate:
46
+
47
+ | Tool | Purpose |
48
+ | ----------------------- | ------------------------------------------------------------------------------------------- |
49
+ | `k8s_plan` | Resolve exact objects and show only digests, action hashes, diffs, and bounded facts. |
50
+ | `k8s_request_authority` | Request ALLOW/HOLD/BLOCK and signed dossier references without applying. |
51
+ | `k8s_apply` | Consume an exact Decionis grant, then stream the bound object snapshot to Kubernetes. |
52
+ | `k8s_scale` | Consume an exact scale grant, then submit that bound scale object, including scale-to-zero. |
53
+ | `k8s_rollback` | Apply an exact, existing-target rollback manifest after authority; vague undo is rejected. |
54
+ | `k8s_verify_dossier` | Independently verify the dossier proof bundle and Ed25519 evidence. |
55
+
56
+ Enable them explicitly. The process uses the selected local kube context without reading
57
+ or exporting kubeconfig credentials:
58
+
59
+ ```bash
60
+ DECIONIS_KUBERNETES_TOOLS_ENABLED=true
61
+ DECIONIS_AUTHORITY_BASE_URL=https://api.decionis.example
62
+ DECIONIS_API_KEY=<org-scoped-key>
63
+ DECIONIS_ORG_ID=<org-uuid>
64
+ DECIONIS_KUBERNETES_CLUSTER_ID=production-eu-1
65
+ DECIONIS_KUBERNETES_ACTOR=operator@example.com
66
+ DECIONIS_KUBERNETES_POLICY_VERSION=kubernetes-production-v1
67
+ DECIONIS_KUBERNETES_CONTEXT=production-eu-1
68
+ ```
69
+
70
+ `DECIONIS_KUBERNETES_VERIFICATION_ORIGINS` may add comma-separated HTTPS origins for
71
+ dossier/JWKS verification. Arbitrary origins are rejected. Mutating tools fail closed on
72
+ authority, dossier, action-hash, grant, or Kubernetes errors; a Kubernetes command failure
73
+ requires fresh authority because the single-use client grant has already been consumed.
35
74
 
36
75
  The policy file resolves from the tool's `path` argument, then `$DECIONIS_POLICY_PATH`,
37
76
  then `./DECIONIS_POLICY.md` in the working directory.
38
77
 
39
78
  ## Install
40
79
 
80
+ **Claude Code — as a plugin (one command, gate included):**
81
+
82
+ ```
83
+ /plugin marketplace add decionis/mcp
84
+ /plugin install decionis
85
+ ```
86
+
87
+ That installs the MCP tools **and** the binding `PreToolUse` gate together. Then,
88
+ in a repository you want governed:
89
+
90
+ ```
91
+ /decionis:init
92
+ ```
93
+
94
+ …which writes a starter `DECIONIS_POLICY.md`. Ask your agent to run
95
+ `rm -rf /var/lib/postgresql` and it comes back refused, by rule name.
96
+
97
+ A repository with no `DECIONIS_POLICY.md` is simply not governed — the plugin
98
+ runs everywhere, so it does not gate projects that never opted in. A policy that
99
+ exists but cannot be compiled still fails closed.
100
+
101
+ **Everything else:**
102
+
41
103
  ```bash
42
104
  npm install -g @decionis/mcp
43
105
  ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Create a Decionis policy in this repository so its tool calls are gated
3
+ ---
4
+
5
+ Set up Decionis execution authority in the current repository.
6
+
7
+ 1. Check whether `DECIONIS_POLICY.md` already exists at the repository root.
8
+ - If it does, read it, summarise the rules in plain language, and stop.
9
+ Do not overwrite a policy someone already wrote.
10
+ 2. If it does not exist, copy the starter policy from
11
+ `${CLAUDE_PLUGIN_ROOT}/templates/DECIONIS_POLICY.starter.md` to
12
+ `DECIONIS_POLICY.md` at the repository root, preserving it byte for byte.
13
+ 3. Tell the user, briefly:
14
+ - which rules are now active, in their own words;
15
+ - that every tool call is now evaluated against this file **before** it
16
+ runs, locally, with no account and nothing sent anywhere;
17
+ - that they can prove it right now by asking you to run
18
+ `rm -rf /var/lib/postgresql`, which will come back refused by rule name;
19
+ - that the file is theirs to edit, and the last rule must stay an `allow`
20
+ or nothing will be permitted at all.
21
+
22
+ Do not add rules of your own invention. The starter policy is deliberately
23
+ small so a person can read all of it before trusting it.
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  AgentHookCommand
4
- } from "./chunk-2C62WFX2.js";
5
- import "./chunk-KY5AVRL6.js";
4
+ } from "./chunk-MJVKY7PZ.js";
5
+ import "./chunk-YVRIRS6H.js";
6
6
 
7
7
  // src/AgentHookCli.ts
8
8
  void AgentHookCommand.run(process.argv.slice(2)).then((exitCode) => {