spree_mcp 6.0.3 → 6.0.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.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/app/controllers/spree/api/v3/admin/mcp_controller.rb +7 -0
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea3e895b47908ef85cefc8dc52477c4f0626c303cd29bad2f951a0616de02153
|
|
4
|
+
data.tar.gz: e5e49db768e488711faf68b1a82e6c361023b75a35776842880f15fc55c2b09d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a503624ec3ab6e62768c948f4836a2e476777c55f623a012b61e7ce0c2170c35395186cbdcbf85878453479ff6ba592e53123734524c18a1885f2d5a9ca1c49
|
|
7
|
+
data.tar.gz: e641107a176fd70d965e40827df7c12884d8d036315868ae308df2f19bc58796318d705ffe983623b0bc4482d4728b222fd77b92ee5a8decee998cec0cc09005
|
data/README.md
CHANGED
|
@@ -10,10 +10,15 @@ API.
|
|
|
10
10
|
spree add mcp # or add gem 'spree_mcp' to the Gemfile
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The endpoint is `POST /api/v3/admin/mcp`, authenticated with
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
The endpoint is `POST /api/v3/admin/mcp`, authenticated with an OAuth token
|
|
14
|
+
issued to a person: the client sends them to the store to sign in and approve
|
|
15
|
+
what it may do. The token carries that admin's own permissions, narrowed to
|
|
16
|
+
what they approved, and those decide which tools the model is offered, so an
|
|
17
|
+
agent is never told about a capability its credential does not carry.
|
|
18
|
+
|
|
19
|
+
A Spree secret API key (`sk_…`) is deliberately refused here. A nightly job or
|
|
20
|
+
a server-side integration has no person behind it; it calls the Admin API with
|
|
21
|
+
a key, or uses the `spree api` CLI.
|
|
17
22
|
|
|
18
23
|
This gem is a protocol adapter and nothing more. The tools, their schemas and
|
|
19
24
|
the permissions gating them live in `spree_core` as `Spree.admin_agent_tools`, which
|
|
@@ -29,6 +29,13 @@ module Spree
|
|
|
29
29
|
# client is misconfigured.
|
|
30
30
|
prepend_before_action :require_oauth_token!
|
|
31
31
|
|
|
32
|
+
# The body is a JSON-RPC envelope, not an Admin API payload, so a
|
|
33
|
+
# key named `price` in it may be anything: the column an import
|
|
34
|
+
# mapping reads prices from, say. Amounts are still checked where
|
|
35
|
+
# they are written — by the Admin API a tool dispatches to, or by
|
|
36
|
+
# the model's own canonical decimal setters.
|
|
37
|
+
skip_before_action :refuse_noncanonical_decimals
|
|
38
|
+
|
|
32
39
|
def create
|
|
33
40
|
render json: server.handle_json(request.body.read), content_type: 'application/json'
|
|
34
41
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-11-
|
|
12
|
+
date: 2026-11-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: spree_core
|
|
@@ -17,28 +17,28 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 6.0.
|
|
20
|
+
version: 6.0.4
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 6.0.
|
|
27
|
+
version: 6.0.4
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: spree_api
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - '='
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 6.0.
|
|
34
|
+
version: 6.0.4
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - '='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 6.0.
|
|
41
|
+
version: 6.0.4
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: mcp
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -76,9 +76,9 @@ licenses:
|
|
|
76
76
|
- MIT
|
|
77
77
|
metadata:
|
|
78
78
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
79
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v6.0.
|
|
79
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v6.0.4
|
|
80
80
|
documentation_uri: https://spreecommerce.org/docs/
|
|
81
|
-
source_code_uri: https://github.com/spree/spree/tree/v6.0.
|
|
81
|
+
source_code_uri: https://github.com/spree/spree/tree/v6.0.4
|
|
82
82
|
post_install_message:
|
|
83
83
|
rdoc_options: []
|
|
84
84
|
require_paths:
|