datahub-agent-context 1.3.1.8__py3-none-any.whl

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.
Files changed (34) hide show
  1. datahub_agent_context/__init__.py +25 -0
  2. datahub_agent_context/_version.py +16 -0
  3. datahub_agent_context/context.py +97 -0
  4. datahub_agent_context/langchain_tools/__init__.py +8 -0
  5. datahub_agent_context/langchain_tools/builder.py +127 -0
  6. datahub_agent_context/mcp_tools/__init__.py +46 -0
  7. datahub_agent_context/mcp_tools/_token_estimator.py +71 -0
  8. datahub_agent_context/mcp_tools/base.py +325 -0
  9. datahub_agent_context/mcp_tools/descriptions.py +299 -0
  10. datahub_agent_context/mcp_tools/documents.py +473 -0
  11. datahub_agent_context/mcp_tools/domains.py +246 -0
  12. datahub_agent_context/mcp_tools/entities.py +349 -0
  13. datahub_agent_context/mcp_tools/get_me.py +99 -0
  14. datahub_agent_context/mcp_tools/gql/__init__.py +13 -0
  15. datahub_agent_context/mcp_tools/gql/document_search.gql +114 -0
  16. datahub_agent_context/mcp_tools/gql/document_semantic_search.gql +111 -0
  17. datahub_agent_context/mcp_tools/gql/entity_details.gql +1682 -0
  18. datahub_agent_context/mcp_tools/gql/queries.gql +51 -0
  19. datahub_agent_context/mcp_tools/gql/query_entity.gql +37 -0
  20. datahub_agent_context/mcp_tools/gql/read_documents.gql +16 -0
  21. datahub_agent_context/mcp_tools/gql/search.gql +242 -0
  22. datahub_agent_context/mcp_tools/helpers.py +448 -0
  23. datahub_agent_context/mcp_tools/lineage.py +698 -0
  24. datahub_agent_context/mcp_tools/owners.py +318 -0
  25. datahub_agent_context/mcp_tools/queries.py +191 -0
  26. datahub_agent_context/mcp_tools/search.py +239 -0
  27. datahub_agent_context/mcp_tools/structured_properties.py +447 -0
  28. datahub_agent_context/mcp_tools/tags.py +296 -0
  29. datahub_agent_context/mcp_tools/terms.py +295 -0
  30. datahub_agent_context/py.typed +2 -0
  31. datahub_agent_context-1.3.1.8.dist-info/METADATA +233 -0
  32. datahub_agent_context-1.3.1.8.dist-info/RECORD +34 -0
  33. datahub_agent_context-1.3.1.8.dist-info/WHEEL +5 -0
  34. datahub_agent_context-1.3.1.8.dist-info/top_level.txt +1 -0
@@ -0,0 +1,13 @@
1
+ # Copyright 2021 Acryl Data, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -0,0 +1,114 @@
1
+ # GraphQL query for searching Document entities (keyword search)
2
+ # Returns document metadata WITHOUT content to avoid context bloat
3
+
4
+ fragment DocumentSearchInfo on Document {
5
+ urn
6
+ subType
7
+ platform {
8
+ urn
9
+ name
10
+ }
11
+ info {
12
+ title
13
+ source {
14
+ sourceType
15
+ externalUrl
16
+ }
17
+ lastModified {
18
+ time
19
+ actor {
20
+ urn
21
+ }
22
+ }
23
+ created {
24
+ time
25
+ actor {
26
+ urn
27
+ }
28
+ }
29
+ }
30
+ domain {
31
+ domain {
32
+ urn
33
+ properties {
34
+ name
35
+ }
36
+ }
37
+ }
38
+ tags {
39
+ tags {
40
+ tag {
41
+ urn
42
+ properties {
43
+ name
44
+ }
45
+ }
46
+ }
47
+ }
48
+ glossaryTerms {
49
+ terms {
50
+ term {
51
+ urn
52
+ properties {
53
+ name
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ fragment DocumentFacetEntityInfo on Entity {
61
+ ... on GlossaryTerm {
62
+ properties {
63
+ name
64
+ }
65
+ }
66
+ ... on Domain {
67
+ properties {
68
+ name
69
+ }
70
+ }
71
+ }
72
+
73
+ query searchDocuments(
74
+ $query: String!
75
+ $orFilters: [AndFilterInput!]
76
+ $count: Int!
77
+ $start: Int!
78
+ $viewUrn: String
79
+ ) {
80
+ searchAcrossEntities(
81
+ input: {
82
+ query: $query
83
+ count: $count
84
+ start: $start
85
+ types: [DOCUMENT]
86
+ orFilters: $orFilters
87
+ viewUrn: $viewUrn
88
+ searchFlags: { skipHighlighting: true, maxAggValues: 10 }
89
+ }
90
+ ) {
91
+ start
92
+ count
93
+ total
94
+ searchResults {
95
+ entity {
96
+ ... on Document {
97
+ ...DocumentSearchInfo
98
+ }
99
+ }
100
+ }
101
+ facets {
102
+ field
103
+ displayName
104
+ aggregations {
105
+ value
106
+ count
107
+ displayName
108
+ entity {
109
+ ...DocumentFacetEntityInfo
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
@@ -0,0 +1,111 @@
1
+ # GraphQL query for searching Document entities (semantic search)
2
+ # Returns document metadata WITHOUT content to avoid context bloat
3
+
4
+ fragment DocumentSearchInfo on Document {
5
+ urn
6
+ subType
7
+ platform {
8
+ urn
9
+ name
10
+ }
11
+ info {
12
+ title
13
+ source {
14
+ sourceType
15
+ externalUrl
16
+ }
17
+ lastModified {
18
+ time
19
+ actor {
20
+ urn
21
+ }
22
+ }
23
+ created {
24
+ time
25
+ actor {
26
+ urn
27
+ }
28
+ }
29
+ }
30
+ domain {
31
+ domain {
32
+ urn
33
+ properties {
34
+ name
35
+ }
36
+ }
37
+ }
38
+ tags {
39
+ tags {
40
+ tag {
41
+ urn
42
+ properties {
43
+ name
44
+ }
45
+ }
46
+ }
47
+ }
48
+ glossaryTerms {
49
+ terms {
50
+ term {
51
+ urn
52
+ properties {
53
+ name
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ fragment DocumentFacetEntityInfo on Entity {
61
+ ... on GlossaryTerm {
62
+ properties {
63
+ name
64
+ }
65
+ }
66
+ ... on Domain {
67
+ properties {
68
+ name
69
+ }
70
+ }
71
+ }
72
+
73
+ query documentSemanticSearch(
74
+ $query: String!
75
+ $orFilters: [AndFilterInput!]
76
+ $count: Int!
77
+ $viewUrn: String
78
+ ) {
79
+ semanticSearchAcrossEntities(
80
+ input: {
81
+ query: $query
82
+ count: $count
83
+ types: [DOCUMENT]
84
+ orFilters: $orFilters
85
+ viewUrn: $viewUrn
86
+ searchFlags: { skipHighlighting: true, maxAggValues: 10 }
87
+ }
88
+ ) {
89
+ count
90
+ total
91
+ searchResults {
92
+ entity {
93
+ ... on Document {
94
+ ...DocumentSearchInfo
95
+ }
96
+ }
97
+ }
98
+ facets {
99
+ field
100
+ displayName
101
+ aggregations {
102
+ value
103
+ count
104
+ displayName
105
+ entity {
106
+ ...DocumentFacetEntityInfo
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }