trustgraph-cli 1.4.14__tar.gz → 1.4.16__tar.gz
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.
Potentially problematic release.
This version of trustgraph-cli might be problematic. Click here for more details.
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/PKG-INFO +1 -1
- trustgraph_cli-1.4.16/trustgraph/cli/show_parameter_types.py +210 -0
- trustgraph_cli-1.4.16/trustgraph/cli_version.py +1 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/PKG-INFO +1 -1
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/SOURCES.txt +1 -0
- trustgraph_cli-1.4.14/trustgraph/cli_version.py +0 -1
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/README.md +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/pyproject.toml +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/setup.cfg +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/__init__.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/add_library_document.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_collection.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_config_item.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_flow_class.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_kg_core.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_mcp_tool.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/delete_tool.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/dump_msgpack.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/get_config_item.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/get_flow_class.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/get_kg_core.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/graph_to_turtle.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/init_pulsar_manager.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/init_trustgraph.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_agent.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_document_rag.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_graph_rag.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_llm.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_mcp_tool.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_nlp_query.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_objects_query.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_prompt.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/invoke_structured_query.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/list_collections.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/list_config_items.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_doc_embeds.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_kg_core.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_knowledge.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_pdf.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_sample_documents.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_structured_data.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_text.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/load_turtle.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/put_config_item.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/put_flow_class.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/put_kg_core.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/remove_library_document.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/save_doc_embeds.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/set_collection.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/set_mcp_tool.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/set_prompt.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/set_token_costs.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/set_tool.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_config.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_flow_classes.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_flow_state.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_flows.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_graph.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_kg_cores.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_library_documents.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_library_processing.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_mcp_tools.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_processor_state.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_prompts.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_token_costs.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_token_rate.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/show_tools.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/start_flow.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/start_library_processing.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/stop_flow.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/stop_library_processing.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph/cli/unload_kg_core.py +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/entry_points.txt +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/requires.txt +0 -0
- {trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.16
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Shows all defined parameter types used in flow classes.
|
|
3
|
+
|
|
4
|
+
Parameter types define the schema and constraints for parameters that can
|
|
5
|
+
be used in flow class definitions. This includes data types, default values,
|
|
6
|
+
valid enums, and validation rules.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
import tabulate
|
|
12
|
+
from trustgraph.api import Api, ConfigKey
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
|
|
16
|
+
|
|
17
|
+
def format_enum_values(enum_list):
|
|
18
|
+
"""
|
|
19
|
+
Format enum values for display, handling both old and new formats
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
enum_list: List of enum values (strings or objects with id/description)
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
Formatted string describing enum options
|
|
26
|
+
"""
|
|
27
|
+
if not enum_list:
|
|
28
|
+
return "Any value"
|
|
29
|
+
|
|
30
|
+
enum_items = []
|
|
31
|
+
for item in enum_list:
|
|
32
|
+
if isinstance(item, dict):
|
|
33
|
+
# New format: objects with id and description
|
|
34
|
+
enum_id = item.get("id", "")
|
|
35
|
+
description = item.get("description", "")
|
|
36
|
+
if description:
|
|
37
|
+
enum_items.append(f"{enum_id} ({description})")
|
|
38
|
+
else:
|
|
39
|
+
enum_items.append(enum_id)
|
|
40
|
+
else:
|
|
41
|
+
# Old format: simple strings
|
|
42
|
+
enum_items.append(str(item))
|
|
43
|
+
|
|
44
|
+
return "\n".join(f"• {item}" for item in enum_items)
|
|
45
|
+
|
|
46
|
+
def format_constraints(param_type_def):
|
|
47
|
+
"""
|
|
48
|
+
Format validation constraints for display
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
param_type_def: Parameter type definition
|
|
52
|
+
|
|
53
|
+
Returns:
|
|
54
|
+
Formatted string describing constraints
|
|
55
|
+
"""
|
|
56
|
+
constraints = []
|
|
57
|
+
|
|
58
|
+
# Handle numeric constraints
|
|
59
|
+
if "minimum" in param_type_def:
|
|
60
|
+
constraints.append(f"min: {param_type_def['minimum']}")
|
|
61
|
+
if "maximum" in param_type_def:
|
|
62
|
+
constraints.append(f"max: {param_type_def['maximum']}")
|
|
63
|
+
|
|
64
|
+
# Handle string constraints
|
|
65
|
+
if "minLength" in param_type_def:
|
|
66
|
+
constraints.append(f"min length: {param_type_def['minLength']}")
|
|
67
|
+
if "maxLength" in param_type_def:
|
|
68
|
+
constraints.append(f"max length: {param_type_def['maxLength']}")
|
|
69
|
+
if "pattern" in param_type_def:
|
|
70
|
+
constraints.append(f"pattern: {param_type_def['pattern']}")
|
|
71
|
+
|
|
72
|
+
# Handle required field
|
|
73
|
+
if param_type_def.get("required", False):
|
|
74
|
+
constraints.append("required")
|
|
75
|
+
|
|
76
|
+
return ", ".join(constraints) if constraints else "None"
|
|
77
|
+
|
|
78
|
+
def show_parameter_types(url):
|
|
79
|
+
"""
|
|
80
|
+
Show all parameter type definitions
|
|
81
|
+
"""
|
|
82
|
+
api = Api(url)
|
|
83
|
+
config_api = api.config()
|
|
84
|
+
|
|
85
|
+
# Get list of all parameter types
|
|
86
|
+
try:
|
|
87
|
+
param_type_names = config_api.list("parameter-types")
|
|
88
|
+
except Exception as e:
|
|
89
|
+
print(f"Error retrieving parameter types: {e}")
|
|
90
|
+
return
|
|
91
|
+
|
|
92
|
+
if len(param_type_names) == 0:
|
|
93
|
+
print("No parameter types defined.")
|
|
94
|
+
return
|
|
95
|
+
|
|
96
|
+
for param_type_name in param_type_names:
|
|
97
|
+
try:
|
|
98
|
+
# Get the parameter type definition
|
|
99
|
+
key = ConfigKey("parameter-types", param_type_name)
|
|
100
|
+
type_def_value = config_api.get([key])[0].value
|
|
101
|
+
param_type_def = json.loads(type_def_value)
|
|
102
|
+
|
|
103
|
+
table = []
|
|
104
|
+
table.append(("name", param_type_name))
|
|
105
|
+
table.append(("description", param_type_def.get("description", "")))
|
|
106
|
+
table.append(("type", param_type_def.get("type", "unknown")))
|
|
107
|
+
|
|
108
|
+
# Show default value if present
|
|
109
|
+
default = param_type_def.get("default")
|
|
110
|
+
if default is not None:
|
|
111
|
+
table.append(("default", str(default)))
|
|
112
|
+
|
|
113
|
+
# Show enum values if present
|
|
114
|
+
enum_list = param_type_def.get("enum")
|
|
115
|
+
if enum_list:
|
|
116
|
+
enum_str = format_enum_values(enum_list)
|
|
117
|
+
table.append(("valid values", enum_str))
|
|
118
|
+
|
|
119
|
+
# Show constraints
|
|
120
|
+
constraints = format_constraints(param_type_def)
|
|
121
|
+
if constraints != "None":
|
|
122
|
+
table.append(("constraints", constraints))
|
|
123
|
+
|
|
124
|
+
print(tabulate.tabulate(
|
|
125
|
+
table,
|
|
126
|
+
tablefmt="pretty",
|
|
127
|
+
stralign="left",
|
|
128
|
+
))
|
|
129
|
+
print()
|
|
130
|
+
|
|
131
|
+
except Exception as e:
|
|
132
|
+
print(f"Error retrieving parameter type '{param_type_name}': {e}")
|
|
133
|
+
print()
|
|
134
|
+
|
|
135
|
+
def main():
|
|
136
|
+
parser = argparse.ArgumentParser(
|
|
137
|
+
prog='tg-show-parameter-types',
|
|
138
|
+
description=__doc__,
|
|
139
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
parser.add_argument(
|
|
143
|
+
'-u', '--api-url',
|
|
144
|
+
default=default_url,
|
|
145
|
+
help=f'API URL (default: {default_url})',
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
parser.add_argument(
|
|
149
|
+
'-t', '--type',
|
|
150
|
+
help='Show only the specified parameter type',
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
args = parser.parse_args()
|
|
154
|
+
|
|
155
|
+
try:
|
|
156
|
+
if args.type:
|
|
157
|
+
# Show specific parameter type
|
|
158
|
+
show_specific_parameter_type(args.api_url, args.type)
|
|
159
|
+
else:
|
|
160
|
+
# Show all parameter types
|
|
161
|
+
show_parameter_types(args.api_url)
|
|
162
|
+
|
|
163
|
+
except Exception as e:
|
|
164
|
+
print("Exception:", e, flush=True)
|
|
165
|
+
|
|
166
|
+
def show_specific_parameter_type(url, param_type_name):
|
|
167
|
+
"""
|
|
168
|
+
Show a specific parameter type definition
|
|
169
|
+
"""
|
|
170
|
+
api = Api(url)
|
|
171
|
+
config_api = api.config()
|
|
172
|
+
|
|
173
|
+
try:
|
|
174
|
+
# Get the parameter type definition
|
|
175
|
+
key = ConfigKey("parameter-types", param_type_name)
|
|
176
|
+
type_def_value = config_api.get([key])[0].value
|
|
177
|
+
param_type_def = json.loads(type_def_value)
|
|
178
|
+
|
|
179
|
+
table = []
|
|
180
|
+
table.append(("name", param_type_name))
|
|
181
|
+
table.append(("description", param_type_def.get("description", "")))
|
|
182
|
+
table.append(("type", param_type_def.get("type", "unknown")))
|
|
183
|
+
|
|
184
|
+
# Show default value if present
|
|
185
|
+
default = param_type_def.get("default")
|
|
186
|
+
if default is not None:
|
|
187
|
+
table.append(("default", str(default)))
|
|
188
|
+
|
|
189
|
+
# Show enum values if present
|
|
190
|
+
enum_list = param_type_def.get("enum")
|
|
191
|
+
if enum_list:
|
|
192
|
+
enum_str = format_enum_values(enum_list)
|
|
193
|
+
table.append(("valid values", enum_str))
|
|
194
|
+
|
|
195
|
+
# Show constraints
|
|
196
|
+
constraints = format_constraints(param_type_def)
|
|
197
|
+
if constraints != "None":
|
|
198
|
+
table.append(("constraints", constraints))
|
|
199
|
+
|
|
200
|
+
print(tabulate.tabulate(
|
|
201
|
+
table,
|
|
202
|
+
tablefmt="pretty",
|
|
203
|
+
stralign="left",
|
|
204
|
+
))
|
|
205
|
+
|
|
206
|
+
except Exception as e:
|
|
207
|
+
print(f"Error retrieving parameter type '{param_type_name}': {e}")
|
|
208
|
+
|
|
209
|
+
if __name__ == "__main__":
|
|
210
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.16"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.16
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -54,6 +54,7 @@ trustgraph/cli/show_kg_cores.py
|
|
|
54
54
|
trustgraph/cli/show_library_documents.py
|
|
55
55
|
trustgraph/cli/show_library_processing.py
|
|
56
56
|
trustgraph/cli/show_mcp_tools.py
|
|
57
|
+
trustgraph/cli/show_parameter_types.py
|
|
57
58
|
trustgraph/cli/show_processor_state.py
|
|
58
59
|
trustgraph/cli/show_prompts.py
|
|
59
60
|
trustgraph/cli/show_token_costs.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.14"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-1.4.14 → trustgraph_cli-1.4.16}/trustgraph_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|