reeve 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +176 -1
- data/README.md +202 -12
- data/lib/generators/reeve/install/templates/create_audit_entries.rb.tt +41 -3
- data/lib/generators/reeve/install/templates/initializer.rb.tt +20 -0
- data/lib/generators/reeve/upgrade/templates/add_ledger_chain_to_reeve_audit_entries.rb.tt +51 -0
- data/lib/generators/reeve/upgrade/upgrade_generator.rb +40 -2
- data/lib/reeve/audit/chain/canonical.rb +129 -0
- data/lib/reeve/audit/chain/head.rb +94 -0
- data/lib/reeve/audit/chain/keyring.rb +53 -0
- data/lib/reeve/audit/chain/normalizer.rb +88 -0
- data/lib/reeve/audit/chain/report.rb +134 -0
- data/lib/reeve/audit/chain/verification.rb +110 -0
- data/lib/reeve/audit/chain/verifier.rb +160 -0
- data/lib/reeve/audit/chain/walk.rb +123 -0
- data/lib/reeve/audit/chain.rb +168 -0
- data/lib/reeve/audit/chain_record.rb +61 -0
- data/lib/reeve/audit/isolated_recorder.rb +5 -0
- data/lib/reeve/audit/recorder.rb +32 -19
- data/lib/reeve/audit.rb +24 -4
- data/lib/reeve/authorization.rb +1 -11
- data/lib/reeve/configuration.rb +90 -2
- data/lib/reeve/decision.rb +6 -1
- data/lib/reeve/errors.rb +28 -0
- data/lib/reeve/inventory/report.rb +146 -0
- data/lib/reeve/inventory.rb +212 -0
- data/lib/reeve/invocation.rb +3 -1
- data/lib/reeve/ledger_key.rb +47 -0
- data/lib/reeve/railtie.rb +15 -0
- data/lib/reeve/tasks.rb +62 -0
- data/lib/reeve/testing/assertions.rb +2 -2
- data/lib/reeve/testing/checks/contract_version.rb +2 -1
- data/lib/reeve/testing/checks/endpoint_coverage.rb +133 -0
- data/lib/reeve/testing/checks/ledger_chain.rb +116 -0
- data/lib/reeve/testing/checks.rb +43 -7
- data/lib/reeve/testing/compliance_assertions.rb +4 -1
- data/lib/reeve/testing/compliance_suite.rb +4 -1
- data/lib/reeve/testing/ledger.rb +11 -1
- data/lib/reeve/testing/matchers/pass_reeve_check.rb +1 -1
- data/lib/reeve/testing/report.rb +30 -6
- data/lib/reeve/testing/result.rb +28 -8
- data/lib/reeve/testing.rb +20 -4
- data/lib/reeve/version.rb +1 -1
- data/lib/reeve.rb +3 -0
- metadata +20 -2
data/lib/reeve/testing.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Reeve
|
|
|
18
18
|
#
|
|
19
19
|
# require "reeve/testing"
|
|
20
20
|
# report = Reeve::Checks.run_all(principals: [alice, bob])
|
|
21
|
-
# abort report.to_s
|
|
21
|
+
# abort report.to_s if report.failed? || report.nothing_checked?
|
|
22
22
|
module Testing
|
|
23
23
|
class << self
|
|
24
24
|
# The two fixture principals the compliance suite runs every tool against. Set once,
|
|
@@ -41,17 +41,23 @@ module Reeve
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# The tools the suite walks. Unset means every tool reeve knows about — the classes
|
|
44
|
-
# that included the DSL, guarded or not
|
|
45
|
-
#
|
|
44
|
+
# that included the DSL, guarded or not, plus every class the endpoint inventory
|
|
45
|
+
# routes to, which need not have included anything. That default is what makes an
|
|
46
|
+
# unguarded tool visible rather than merely absent.
|
|
46
47
|
attr_writer :compliance_tools
|
|
47
48
|
|
|
48
49
|
def compliance_tools
|
|
49
50
|
source = @compliance_tools || Reeve.config.compliance_tools
|
|
50
|
-
return Reeve.registry.tool_classes if source.nil?
|
|
51
|
+
return Reeve.registry.tool_classes | inventory_tools if source.nil?
|
|
51
52
|
|
|
52
53
|
Array(source.respond_to?(:call) ? source.call : source)
|
|
53
54
|
end
|
|
54
55
|
|
|
56
|
+
# The host said which tools it is certifying, so a run is a subset by its own account.
|
|
57
|
+
def compliance_tools_narrowed?
|
|
58
|
+
!(@compliance_tools || Reeve.config.compliance_tools).nil?
|
|
59
|
+
end
|
|
60
|
+
|
|
55
61
|
def compliance_principals?
|
|
56
62
|
!(@compliance_principals || Reeve.config.compliance_principals).nil?
|
|
57
63
|
end
|
|
@@ -63,6 +69,16 @@ module Reeve
|
|
|
63
69
|
|
|
64
70
|
private
|
|
65
71
|
|
|
72
|
+
# An inventory that cannot be read adds nothing here; EndpointCoverage fails on it
|
|
73
|
+
# by name, which is a better place to learn about it than an exception in every
|
|
74
|
+
# per-tool check.
|
|
75
|
+
def inventory_tools
|
|
76
|
+
inventory = Reeve.config.inventory
|
|
77
|
+
inventory ? inventory.routed_tools : []
|
|
78
|
+
rescue StandardError
|
|
79
|
+
[]
|
|
80
|
+
end
|
|
81
|
+
|
|
66
82
|
def missing_principals_message
|
|
67
83
|
"the reeve compliance suite needs two fixture principals with disjoint records. " \
|
|
68
84
|
"Set them in your test helper:\n\n " \
|
data/lib/reeve/version.rb
CHANGED
data/lib/reeve.rb
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative "reeve/version"
|
|
4
4
|
require_relative "reeve/errors"
|
|
5
|
+
require_relative "reeve/ledger_key"
|
|
5
6
|
require_relative "reeve/decision"
|
|
6
7
|
require_relative "reeve/configuration"
|
|
7
8
|
require_relative "reeve/context"
|
|
8
9
|
require_relative "reeve/scope_result"
|
|
9
10
|
require_relative "reeve/invocation"
|
|
10
11
|
require_relative "reeve/authorization"
|
|
12
|
+
require_relative "reeve/inventory"
|
|
13
|
+
require_relative "reeve/railtie" if defined?(Rails::Railtie)
|
|
11
14
|
|
|
12
15
|
# Reeve — per-record authorization and an append-only audit ledger for the MCP tools
|
|
13
16
|
# a Rails application exposes to AI agents.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reeve
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Velazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
Reeve makes it safe for a Rails application to expose MCP (Model Context Protocol)
|
|
@@ -31,9 +31,20 @@ files:
|
|
|
31
31
|
- lib/generators/reeve/install/templates/create_audit_entries.rb.tt
|
|
32
32
|
- lib/generators/reeve/install/templates/initializer.rb.tt
|
|
33
33
|
- lib/generators/reeve/upgrade/templates/add_contract_version_to_reeve_audit_entries.rb.tt
|
|
34
|
+
- lib/generators/reeve/upgrade/templates/add_ledger_chain_to_reeve_audit_entries.rb.tt
|
|
34
35
|
- lib/generators/reeve/upgrade/upgrade_generator.rb
|
|
35
36
|
- lib/reeve.rb
|
|
36
37
|
- lib/reeve/audit.rb
|
|
38
|
+
- lib/reeve/audit/chain.rb
|
|
39
|
+
- lib/reeve/audit/chain/canonical.rb
|
|
40
|
+
- lib/reeve/audit/chain/head.rb
|
|
41
|
+
- lib/reeve/audit/chain/keyring.rb
|
|
42
|
+
- lib/reeve/audit/chain/normalizer.rb
|
|
43
|
+
- lib/reeve/audit/chain/report.rb
|
|
44
|
+
- lib/reeve/audit/chain/verification.rb
|
|
45
|
+
- lib/reeve/audit/chain/verifier.rb
|
|
46
|
+
- lib/reeve/audit/chain/walk.rb
|
|
47
|
+
- lib/reeve/audit/chain_record.rb
|
|
37
48
|
- lib/reeve/audit/entry.rb
|
|
38
49
|
- lib/reeve/audit/isolated_recorder.rb
|
|
39
50
|
- lib/reeve/audit/query.rb
|
|
@@ -56,10 +67,15 @@ files:
|
|
|
56
67
|
- lib/reeve/fast_mcp.rb
|
|
57
68
|
- lib/reeve/integrations/fast_mcp/context_builder.rb
|
|
58
69
|
- lib/reeve/integrations/fast_mcp/tool_extension.rb
|
|
70
|
+
- lib/reeve/inventory.rb
|
|
71
|
+
- lib/reeve/inventory/report.rb
|
|
59
72
|
- lib/reeve/invocation.rb
|
|
73
|
+
- lib/reeve/ledger_key.rb
|
|
60
74
|
- lib/reeve/minitest.rb
|
|
75
|
+
- lib/reeve/railtie.rb
|
|
61
76
|
- lib/reeve/rspec.rb
|
|
62
77
|
- lib/reeve/scope_result.rb
|
|
78
|
+
- lib/reeve/tasks.rb
|
|
63
79
|
- lib/reeve/testing.rb
|
|
64
80
|
- lib/reeve/testing/assertions.rb
|
|
65
81
|
- lib/reeve/testing/checks.rb
|
|
@@ -67,7 +83,9 @@ files:
|
|
|
67
83
|
- lib/reeve/testing/checks/base.rb
|
|
68
84
|
- lib/reeve/testing/checks/contract_version.rb
|
|
69
85
|
- lib/reeve/testing/checks/cross_principal_leak.rb
|
|
86
|
+
- lib/reeve/testing/checks/endpoint_coverage.rb
|
|
70
87
|
- lib/reeve/testing/checks/guard_declared.rb
|
|
88
|
+
- lib/reeve/testing/checks/ledger_chain.rb
|
|
71
89
|
- lib/reeve/testing/checks/principal_required.rb
|
|
72
90
|
- lib/reeve/testing/checks/redaction_holds.rb
|
|
73
91
|
- lib/reeve/testing/checks/rule_present.rb
|