hub_kernel-mcp 0.8.1 → 0.9.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/app/controllers/hub_kernel/mcp/application_controller.rb +7 -0
- data/app/controllers/hub_kernel/mcp/authorizations_controller.rb +1 -1
- data/app/views/hub_kernel/mcp/_connections.html.erb +9 -4
- data/app/views/hub_kernel/mcp/authorizations/new.html.erb +12 -4
- data/app/views/hub_kernel/mcp/authorizations/refused.html.erb +3 -1
- data/lib/hub_kernel/mcp/engine.rb +5 -0
- data/lib/hub_kernel/mcp/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8534b1719040ee0fe7abd7dbf92ab23f559c488830a708197ee1b2180c10ef8
|
|
4
|
+
data.tar.gz: c9786d5f6a3f119b0764d13f89388c0f79af29c61a61a5474ccb0c416e787be5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf5665cfff0c4fa70f333d33da2f44d0bf1ad4ea61d36963c072c0c1111092b6b49ad81c6602d397bb5554dc1870acf7077afe64c3ea5514e8f564fa1f23a318
|
|
7
|
+
data.tar.gz: 679fde439d3736ba3ad2237dd50588cef2ca1c5692758791461b639bab6273fc133266f18492d96d30dedfd38ec5edbd8f85af496cd070493affea4dab342be9
|
|
@@ -2,7 +2,7 @@ require "uri"
|
|
|
2
2
|
|
|
3
3
|
module HubKernel
|
|
4
4
|
module Mcp
|
|
5
|
-
class AuthorizationsController <
|
|
5
|
+
class AuthorizationsController < ApplicationController
|
|
6
6
|
APPROVAL_PARAMS = %i[response_type client_id redirect_uri state code_challenge code_challenge_method].freeze
|
|
7
7
|
|
|
8
8
|
layout -> { HubKernel::Mcp.browser_layout }
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<ul>
|
|
2
2
|
<% HubKernel::Mcp::Connection.of(person).includes(:client).order(:created_at).each do |connection| %>
|
|
3
3
|
<li>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
<%= ui_section(title: connection.client.name, subtitle: "Connected #{l(connection.created_at, format: :long)}") do %>
|
|
5
|
+
<%= ui_panel do %>
|
|
6
|
+
<span><%= connection.last_used_at ? "Last used #{l(connection.last_used_at, format: :long)}" : "Never used" %></span>
|
|
7
|
+
<%= ui_form(action: submit_url, method: :patch) do %>
|
|
8
|
+
<%= hidden_field_tag :connection_id, connection.id %>
|
|
9
|
+
<%= ui_button(label: "Disconnect", variant: :danger) %>
|
|
10
|
+
<% end %>
|
|
11
|
+
<% end %>
|
|
12
|
+
<% end %>
|
|
8
13
|
</li>
|
|
9
14
|
<% end %>
|
|
10
15
|
</ul>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
<%= ui_page_header(title: "#{@client.name} wants to connect as you") %>
|
|
2
2
|
|
|
3
|
-
<%=
|
|
3
|
+
<%= ui_form(action: request.path, data: { turbo: false }) do %>
|
|
4
4
|
<% approval_params.each do |name, value| %>
|
|
5
5
|
<%= hidden_field_tag name, value %>
|
|
6
6
|
<% end %>
|
|
7
|
-
<%=
|
|
8
|
-
<%=
|
|
7
|
+
<%= hidden_field_tag :decision, "approve" %>
|
|
8
|
+
<%= ui_button(label: "Approve") %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<%= ui_form(action: request.path, data: { turbo: false }) do %>
|
|
12
|
+
<% approval_params.each do |name, value| %>
|
|
13
|
+
<%= hidden_field_tag name, value %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<%= hidden_field_tag :decision, "deny" %>
|
|
16
|
+
<%= ui_button(label: "Deny", variant: :secondary) %>
|
|
9
17
|
<% end %>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require "keystone_ui"
|
|
1
2
|
require "hub_kernel/mcp/challenge"
|
|
2
3
|
|
|
3
4
|
module HubKernel
|
|
@@ -6,6 +7,10 @@ module HubKernel
|
|
|
6
7
|
isolate_namespace HubKernel::Mcp
|
|
7
8
|
|
|
8
9
|
middleware.use HubKernel::Mcp::Challenge
|
|
10
|
+
|
|
11
|
+
initializer "hub_kernel.mcp.tailwind" do
|
|
12
|
+
KeystoneUi.configuration.tailwind_sources << root.join("app/views/**/*.erb").to_s
|
|
13
|
+
end
|
|
9
14
|
end
|
|
10
15
|
end
|
|
11
16
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hub_kernel-mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- tylercschneider
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0.6'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: keystone_ui
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 0.11.0
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.11.0
|
|
40
54
|
description: hub_kernel-mcp serves the methods every hub a host serves exposes as
|
|
41
55
|
MCP tools at one address, with every call going through the host's sign-in, permission
|
|
42
56
|
check and account scope.
|
|
@@ -49,6 +63,7 @@ files:
|
|
|
49
63
|
- MIT-LICENSE
|
|
50
64
|
- README.md
|
|
51
65
|
- Rakefile
|
|
66
|
+
- app/controllers/hub_kernel/mcp/application_controller.rb
|
|
52
67
|
- app/controllers/hub_kernel/mcp/authorizations_controller.rb
|
|
53
68
|
- app/controllers/hub_kernel/mcp/discovery_controller.rb
|
|
54
69
|
- app/controllers/hub_kernel/mcp/messages_controller.rb
|