stack-service-base 0.0.58 → 0.0.59
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55f435587160a4c4210903f8cf0af139ac161402c49cd82e34da0ec1f0d2115d
|
|
4
|
+
data.tar.gz: 44c4c02fbd588a70835cdd6cb10348e78df5cef0a5017b667445046763084411
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 95d9aff0cff97f4f857247eefe3ed61a03ea05a7d202eb3e118d485d418b7578e76a60190aa4965f6e4fbf4e424d67617e1e394519352817bb0b5fd6c538eeac
|
|
7
|
+
data.tar.gz: 17adacbd6686f78010139866873cb22a6d3c328ae93ace314b8821861af3341bc0740642d262650804a1129aeabb50af6232c6711963d4715ccf877a8077cad7
|
|
@@ -14,6 +14,8 @@ module RpcErrorHelpers
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
class McpProcessor
|
|
17
|
+
PROTOCOL_VERSION = '2025-06-18'
|
|
18
|
+
|
|
17
19
|
include RpcErrorHelpers
|
|
18
20
|
ParseError = Class.new(StandardError) do
|
|
19
21
|
attr_reader :body, :status
|
|
@@ -54,18 +56,40 @@ class McpProcessor
|
|
|
54
56
|
end
|
|
55
57
|
|
|
56
58
|
def rpc_response(id:, method:, params:)
|
|
57
|
-
json_rpc_response(id: id) { handle(method: method, params: params) }
|
|
59
|
+
json_rpc_response(id: id) { |body| handle(method: method, params: params, body: body) }
|
|
58
60
|
end
|
|
59
61
|
|
|
60
|
-
def handle(method:, params:)
|
|
62
|
+
def handle(method:, params:, body: )
|
|
61
63
|
case method
|
|
62
|
-
when "tools/list"
|
|
63
|
-
when "tools/call"
|
|
64
|
+
when "tools/list" then list_tools
|
|
65
|
+
when "tools/call" then call_tool(params || {})
|
|
66
|
+
when "initialize" then initialize_(body)
|
|
67
|
+
when "initialized" then {}
|
|
64
68
|
else
|
|
65
69
|
rpc_error!(-32601, "Unknown method #{method}")
|
|
66
70
|
end
|
|
67
71
|
end
|
|
68
72
|
|
|
73
|
+
# https://gist.github.com/ruvnet/7b6843c457822cbcf42fc4aa635eadbb
|
|
74
|
+
|
|
75
|
+
def initialize_(body)
|
|
76
|
+
body[:serverInfo] = {
|
|
77
|
+
name: 'mcp-server',
|
|
78
|
+
title: 'MCP Server',
|
|
79
|
+
version: '1.0.0'
|
|
80
|
+
}
|
|
81
|
+
# result
|
|
82
|
+
{
|
|
83
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
84
|
+
capabilities: {
|
|
85
|
+
logging: {},
|
|
86
|
+
prompts: { listChanged: false },
|
|
87
|
+
resources: { listChanged: false },
|
|
88
|
+
tools: { listChanged: false }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
69
93
|
private
|
|
70
94
|
|
|
71
95
|
def json_rpc_response(id:)
|
|
@@ -8,7 +8,7 @@ COPY . .
|
|
|
8
8
|
|
|
9
9
|
CMD ["bash", "-c", "-x", "\
|
|
10
10
|
env && cd /build/docker && \
|
|
11
|
-
build-labels -n -c docker-compose.yml gitlab set_version to_dockerfiles to_compose | tee bake.yml && \
|
|
11
|
+
build-labels -n -c docker-compose.yml changed gitlab set_version to_dockerfiles to_compose | tee bake.yml && \
|
|
12
12
|
export OTEL_RESOURCE_ATTRIBUTES=service.name=docker-builder,pipeline.id=${CI_PIPELINE_ID},project.name=${CI_PROJECT_NAME} && \
|
|
13
13
|
export REGISTRY_HOST=$CI_REGISTRY_HOST && \
|
|
14
14
|
grep \"services: {}\" bake.yml || docker buildx bake -f bake.yml $([ -z \"$CI_SKIP_PUSH\" ] && echo \"--push\") && \
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Options name: 'stack-name'
|
|
2
2
|
|
|
3
|
-
Service :service_name, image: 'service_name/master', ports:
|
|
3
|
+
Service :service_name, image: 'service_name/master', ports: 7000, ingress: { host: 'service_name.*' }
|
|
4
4
|
|
|
5
5
|
raise 'Configure the stack (https://github.com/artyomb/dry-stack)'
|