gitlab-gkg-proto 0.6.0 → 0.7.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/lib/gkg/v1/gkg_pb.rb +22 -20
- data/lib/gkg/v1/gkg_services_pb.rb +19 -16
- data/lib/gkg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac7b8d96c05d3ce82b82ef38915023ca060a14ad5bf9b710d98bd8f4322b6ee7
|
|
4
|
+
data.tar.gz: dceab4234e3a7718730f9786a6f8e85bfc3ffba16c2c8bb146aa18a1f4295d40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8612e0b286ec5e037fcf314ecbee486ecd26f7ba6efe208a81adf3630384570579ff8ebeca8065325237ddafd9d14772c767476ff54d595c2ac7a20e04a8bf51
|
|
7
|
+
data.tar.gz: 23d74003c438b10f852b7ace894337a9adc34e794306a1152029e8e4657575eeb5ab6e2f331eb19b93b3864992e6fe4178d738449fd8c001fb69fc2750f056e5
|
data/lib/gkg/v1/gkg_pb.rb
CHANGED
|
@@ -5,40 +5,42 @@
|
|
|
5
5
|
require 'google/protobuf'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
descriptor_data = "\n\tgkg.proto\x12\x06gkg.v1\"\
|
|
8
|
+
descriptor_data = "\n\tgkg.proto\x12\x06gkg.v1\"\xda\x01\n\x13\x45xecuteQueryMessage\x12.\n\x07request\x18\x01 \x01(\x0b\x32\x1b.gkg.v1.ExecuteQueryRequestH\x00\x12.\n\tredaction\x18\x02 \x01(\x0b\x32\x19.gkg.v1.RedactionExchangeH\x00\x12,\n\x06result\x18\x03 \x01(\x0b\x32\x1a.gkg.v1.ExecuteQueryResultH\x00\x12*\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x19.gkg.v1.ExecuteQueryErrorH\x00\x42\t\n\x07\x63ontent\"s\n\x13\x45xecuteQueryRequest\x12\r\n\x05query\x18\x01 \x01(\t\x12&\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x16.gkg.v1.ResponseFormat\x12%\n\nquery_type\x18\x03 \x01(\x0e\x32\x11.gkg.v1.QueryType\"y\n\x12\x45xecuteQueryResult\x12\x15\n\x0bresult_json\x18\x01 \x01(\tH\x00\x12\x18\n\x0e\x66ormatted_text\x18\x02 \x01(\tH\x00\x12\'\n\x08metadata\x18\x03 \x01(\x0b\x32\x15.gkg.v1.QueryMetadataB\t\n\x07\x63ontent\"Q\n\rQueryMetadata\x12\x12\n\nquery_type\x18\x01 \x01(\t\x12\x19\n\x11raw_query_strings\x18\x02 \x03(\t\x12\x11\n\trow_count\x18\x03 \x01(\x05\"2\n\x11\x45xecuteQueryError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\"U\n\x15GetGraphSchemaRequest\x12\x14\n\x0c\x65xpand_nodes\x18\x01 \x03(\t\x12&\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x16.gkg.v1.ResponseFormat\"m\n\x16GetGraphSchemaResponse\x12.\n\nstructured\x18\x01 \x01(\x0b\x32\x18.gkg.v1.StructuredSchemaH\x00\x12\x18\n\x0e\x66ormatted_text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ontent\"\x97\x01\n\x10StructuredSchema\x12\x16\n\x0eschema_version\x18\x01 \x01(\t\x12%\n\x07\x64omains\x18\x02 \x03(\x0b\x32\x14.gkg.v1.SchemaDomain\x12!\n\x05nodes\x18\x03 \x03(\x0b\x32\x12.gkg.v1.SchemaNode\x12!\n\x05\x65\x64ges\x18\x04 \x03(\x0b\x32\x12.gkg.v1.SchemaEdge\"E\n\x0cSchemaDomain\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x12\n\nnode_names\x18\x03 \x03(\t\"\xed\x01\n\nSchemaNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x0bprimary_key\x18\x04 \x01(\t\x12\x13\n\x0blabel_field\x18\x05 \x01(\t\x12*\n\nproperties\x18\x06 \x03(\x0b\x32\x16.gkg.v1.SchemaProperty\x12&\n\x05style\x18\x07 \x01(\x0b\x32\x17.gkg.v1.SchemaNodeStyle\x12\x16\n\x0eoutgoing_edges\x18\x08 \x03(\t\x12\x16\n\x0eincoming_edges\x18\t \x03(\t\"X\n\x0eSchemaProperty\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x10\n\x08nullable\x18\x03 \x01(\x08\x12\x13\n\x0b\x65num_values\x18\x04 \x03(\t\"\\\n\nSchemaEdge\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12+\n\x08variants\x18\x03 \x03(\x0b\x32\x19.gkg.v1.SchemaEdgeVariant\"=\n\x11SchemaEdgeVariant\x12\x13\n\x0bsource_type\x18\x01 \x01(\t\x12\x13\n\x0btarget_type\x18\x02 \x01(\t\".\n\x0fSchemaNodeStyle\x12\x0c\n\x04size\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\t\"|\n\x11RedactionExchange\x12-\n\x08required\x18\x01 \x01(\x0b\x32\x19.gkg.v1.RedactionRequiredH\x00\x12-\n\x08response\x18\x02 \x01(\x0b\x32\x19.gkg.v1.RedactionResponseH\x00\x42\t\n\x07\x63ontent\"V\n\x11RedactionRequired\x12\x11\n\tresult_id\x18\x01 \x01(\t\x12.\n\tresources\x18\x02 \x03(\x0b\x32\x1b.gkg.v1.ResourceToAuthorize\"U\n\x13ResourceToAuthorize\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_ids\x18\x02 \x03(\x03\x12\x11\n\tabilities\x18\x03 \x03(\t\"]\n\x11RedactionResponse\x12\x11\n\tresult_id\x18\x01 \x01(\t\x12\x35\n\x0e\x61uthorizations\x18\x02 \x03(\x0b\x32\x1d.gkg.v1.ResourceAuthorization\"\xa4\x01\n\x15ResourceAuthorization\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x41\n\nauthorized\x18\x02 \x03(\x0b\x32-.gkg.v1.ResourceAuthorization.AuthorizedEntry\x1a\x31\n\x0f\x41uthorizedEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\x12\n\x10ListToolsRequest\":\n\x11ListToolsResponse\x12%\n\x05tools\x18\x01 \x03(\x0b\x32\x16.gkg.v1.ToolDefinition\"S\n\x0eToolDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1e\n\x16parameters_json_schema\x18\x03 \x01(\t\"A\n\x17GetClusterHealthRequest\x12&\n\x06\x66ormat\x18\x01 \x01(\x0e\x32\x16.gkg.v1.ResponseFormat\"v\n\x18GetClusterHealthResponse\x12\x35\n\nstructured\x18\x01 \x01(\x0b\x32\x1f.gkg.v1.StructuredClusterHealthH\x00\x12\x18\n\x0e\x66ormatted_text\x18\x02 \x01(\tH\x00\x42\t\n\x07\x63ontent\"\x91\x01\n\x17StructuredClusterHealth\x12%\n\x06status\x18\x01 \x01(\x0e\x32\x15.gkg.v1.ClusterStatus\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12+\n\ncomponents\x18\x04 \x03(\x0b\x32\x17.gkg.v1.ComponentHealth\"\xd6\x01\n\x0f\x43omponentHealth\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x06status\x18\x02 \x01(\x0e\x32\x15.gkg.v1.ClusterStatus\x12\'\n\x08replicas\x18\x03 \x01(\x0b\x32\x15.gkg.v1.ReplicaStatus\x12\x35\n\x07metrics\x18\x04 \x03(\x0b\x32$.gkg.v1.ComponentHealth.MetricsEntry\x1a.\n\x0cMetricsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"/\n\rReplicaStatus\x12\r\n\x05ready\x18\x01 \x01(\x05\x12\x0f\n\x07\x64\x65sired\x18\x02 \x01(\x05*B\n\x0eResponseFormat\x12\x17\n\x13RESPONSE_FORMAT_RAW\x10\x00\x12\x17\n\x13RESPONSE_FORMAT_LLM\x10\x01* \n\tQueryType\x12\x13\n\x0fQUERY_TYPE_JSON\x10\x00*\x86\x01\n\rClusterStatus\x12\x1e\n\x1a\x43LUSTER_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x43LUSTER_STATUS_HEALTHY\x10\x01\x12\x1b\n\x17\x43LUSTER_STATUS_DEGRADED\x10\x02\x12\x1c\n\x18\x43LUSTER_STATUS_UNHEALTHY\x10\x03\x32\xcf\x02\n\x15KnowledgeGraphService\x12@\n\tListTools\x12\x18.gkg.v1.ListToolsRequest\x1a\x19.gkg.v1.ListToolsResponse\x12L\n\x0c\x45xecuteQuery\x12\x1b.gkg.v1.ExecuteQueryMessage\x1a\x1b.gkg.v1.ExecuteQueryMessage(\x01\x30\x01\x12O\n\x0eGetGraphSchema\x12\x1d.gkg.v1.GetGraphSchemaRequest\x1a\x1e.gkg.v1.GetGraphSchemaResponse\x12U\n\x10GetClusterHealth\x12\x1f.gkg.v1.GetClusterHealthRequest\x1a .gkg.v1.GetClusterHealthResponseb\x06proto3"
|
|
9
9
|
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
|
12
12
|
|
|
13
13
|
module Gkg
|
|
14
14
|
module V1
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
ExecuteQueryMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryMessage").msgclass
|
|
16
|
+
ExecuteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryRequest").msgclass
|
|
17
|
+
ExecuteQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryResult").msgclass
|
|
18
|
+
QueryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.QueryMetadata").msgclass
|
|
19
|
+
ExecuteQueryError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryError").msgclass
|
|
20
|
+
GetGraphSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetGraphSchemaRequest").msgclass
|
|
21
|
+
GetGraphSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetGraphSchemaResponse").msgclass
|
|
22
|
+
StructuredSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.StructuredSchema").msgclass
|
|
23
|
+
SchemaDomain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaDomain").msgclass
|
|
24
|
+
SchemaNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaNode").msgclass
|
|
25
|
+
SchemaProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaProperty").msgclass
|
|
26
|
+
SchemaEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaEdge").msgclass
|
|
27
|
+
SchemaEdgeVariant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaEdgeVariant").msgclass
|
|
28
|
+
SchemaNodeStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.SchemaNodeStyle").msgclass
|
|
19
29
|
RedactionExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.RedactionExchange").msgclass
|
|
20
30
|
RedactionRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.RedactionRequired").msgclass
|
|
21
|
-
|
|
31
|
+
ResourceToAuthorize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ResourceToAuthorize").msgclass
|
|
22
32
|
RedactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.RedactionResponse").msgclass
|
|
23
33
|
ResourceAuthorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ResourceAuthorization").msgclass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ExecuteQueryMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryMessage").msgclass
|
|
28
|
-
ExecuteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ExecuteQueryRequest").msgclass
|
|
29
|
-
QueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.QueryResult").msgclass
|
|
30
|
-
GetOntologyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetOntologyRequest").msgclass
|
|
31
|
-
GetOntologyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetOntologyResponse").msgclass
|
|
32
|
-
DomainDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.DomainDefinition").msgclass
|
|
33
|
-
NodeDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.NodeDefinition").msgclass
|
|
34
|
-
PropertyDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.PropertyDefinition").msgclass
|
|
35
|
-
NodeStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.NodeStyle").msgclass
|
|
36
|
-
EdgeDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.EdgeDefinition").msgclass
|
|
37
|
-
EdgeVariant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.EdgeVariant").msgclass
|
|
34
|
+
ListToolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ListToolsRequest").msgclass
|
|
35
|
+
ListToolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ListToolsResponse").msgclass
|
|
36
|
+
ToolDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ToolDefinition").msgclass
|
|
38
37
|
GetClusterHealthRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetClusterHealthRequest").msgclass
|
|
39
38
|
GetClusterHealthResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.GetClusterHealthResponse").msgclass
|
|
39
|
+
StructuredClusterHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.StructuredClusterHealth").msgclass
|
|
40
40
|
ComponentHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ComponentHealth").msgclass
|
|
41
41
|
ReplicaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ReplicaStatus").msgclass
|
|
42
|
+
ResponseFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ResponseFormat").enummodule
|
|
43
|
+
QueryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.QueryType").enummodule
|
|
42
44
|
ClusterStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gkg.v1.ClusterStatus").enummodule
|
|
43
45
|
end
|
|
44
46
|
end
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: gkg.proto for package 'gkg.v1'
|
|
3
3
|
# Original file comments:
|
|
4
|
-
# Knowledge Graph gRPC service definition
|
|
5
|
-
#
|
|
4
|
+
# GitLab Knowledge Graph gRPC service definition.
|
|
5
|
+
#
|
|
6
|
+
# Serves the Orbit dashboard, MCP agents, and glab CLI.
|
|
7
|
+
# All data RPCs accept a ResponseFormat to switch between structured JSON (RAW)
|
|
8
|
+
# and token-efficient text (LLM) for AI consumers.
|
|
6
9
|
#
|
|
7
10
|
|
|
8
11
|
require 'grpc'
|
|
@@ -11,7 +14,8 @@ require 'gkg_pb'
|
|
|
11
14
|
module Gkg
|
|
12
15
|
module V1
|
|
13
16
|
module KnowledgeGraphService
|
|
14
|
-
#
|
|
17
|
+
# Core service exposing 4 RPCs. Gated behind the :knowledge_graph feature flag
|
|
18
|
+
# in Rails. JWT auth carries user identity and traversal IDs for authorization.
|
|
15
19
|
class Service
|
|
16
20
|
|
|
17
21
|
include ::GRPC::GenericService
|
|
@@ -20,21 +24,20 @@ module Gkg
|
|
|
20
24
|
self.unmarshal_class_method = :decode
|
|
21
25
|
self.service_name = 'gkg.v1.KnowledgeGraphService'
|
|
22
26
|
|
|
23
|
-
#
|
|
27
|
+
# Returns available tool definitions with parameter schemas.
|
|
28
|
+
# Used by MCP tools/list and GET /api/v4/orbit/tools.
|
|
24
29
|
rpc :ListTools, ::Gkg::V1::ListToolsRequest, ::Gkg::V1::ListToolsResponse
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# 4. Server sends ToolResult with redacted, context-engineered response
|
|
30
|
-
rpc :ExecuteTool, stream(::Gkg::V1::ExecuteToolMessage), stream(::Gkg::V1::ExecuteToolMessage)
|
|
31
|
-
# Execute a raw query with bidirectional streaming for redaction:
|
|
32
|
-
# Same redaction flow as ExecuteTool but returns raw filtered result
|
|
33
|
-
# (no context-engine processing) for the query playground
|
|
30
|
+
# Executes a graph query against ClickHouse with bidirectional streaming
|
|
31
|
+
# for the redaction exchange (server requests authorization checks from Rails,
|
|
32
|
+
# Rails responds with per-resource decisions).
|
|
33
|
+
# Used by MCP tools/call("query_graph") and POST /api/v4/orbit/query.
|
|
34
34
|
rpc :ExecuteQuery, stream(::Gkg::V1::ExecuteQueryMessage), stream(::Gkg::V1::ExecuteQueryMessage)
|
|
35
|
-
# Returns the
|
|
36
|
-
|
|
37
|
-
#
|
|
35
|
+
# Returns the graph ontology (nodes, edges, domains) from in-memory cache.
|
|
36
|
+
# No ClickHouse, no redaction. Supports selective node expansion.
|
|
37
|
+
# Used by MCP tools/call("get_graph_schema") and GET /api/v4/orbit/schema.
|
|
38
|
+
rpc :GetGraphSchema, ::Gkg::V1::GetGraphSchemaRequest, ::Gkg::V1::GetGraphSchemaResponse
|
|
39
|
+
# Returns cluster health and component status.
|
|
40
|
+
# Used by GET /api/v4/orbit/status.
|
|
38
41
|
rpc :GetClusterHealth, ::Gkg::V1::GetClusterHealthRequest, ::Gkg::V1::GetClusterHealthResponse
|
|
39
42
|
end
|
|
40
43
|
|
data/lib/gkg/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-gkg-proto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: grpc
|