trustgraph-cli 2.10.3__tar.gz → 2.10.4__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.
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/PKG-INFO +1 -1
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_knowledge.py +59 -31
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/mint_token.py +26 -11
- trustgraph_cli-2.10.4/trustgraph/cli_version.py +1 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/PKG-INFO +1 -1
- trustgraph_cli-2.10.3/trustgraph/cli_version.py +0 -1
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/README.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/pyproject.toml +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/setup.cfg +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/__init__.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/_iam.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/add_library_document.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/bootstrap_iam.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/change_password.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/create_api_key.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/create_user.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/create_workspace.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_collection.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_config_item.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_kg_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_tool.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/delete_user.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/describe_image.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/disable_user.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/dump_msgpack.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/dump_queues.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/enable_user.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/export_workspace.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/export_workspace_config.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/get_config_item.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/get_de_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/get_document_content.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/get_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/get_kg_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/graph_to_turtle.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/import_workspace.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/import_workspace_config.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/init_pulsar_manager.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_agent.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_document_embeddings.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_document_rag.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_embeddings.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_graph_embeddings.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_graph_rag.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_llm.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_nlp_query.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_prompt.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_reranker.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_row_embeddings.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_rows_query.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_sparql_query.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_structured_query.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_api_keys.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_collections.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_config_items.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_explain_traces.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_my_workspaces.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_users.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/list_workspaces.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_doc_embeds.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_kg_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_sample_documents.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_structured_data.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/load_turtle.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/login.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/monitor_prompts.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/nquads.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/put_config_item.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/put_de_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/put_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/put_kg_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/query_graph.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/remove_library_document.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/reset_password.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/revoke_api_key.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/__init__.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/belgian-beer.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/bronze-age-collapse.pdf +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/corporate-scandals.pdf +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/history-of-pets.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/metadata.json +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/mil-fortifications-america-19th-c.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/recipes.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/trade-routes-europe.md +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/save_doc_embeds.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/set_collection.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/set_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/set_prompt.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/set_token_costs.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/set_tool.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_config.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_explain_trace.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_extraction_provenance.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_flow_blueprints.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_flow_state.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_flows.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_graph.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_kg_cores.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_library_documents.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_library_processing.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_mcp_tools.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_parameter_types.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_processor_state.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_prompts.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_token_costs.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_token_rate.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_tools.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/start_flow.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/start_library_processing.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/stop_flow.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/stop_library_processing.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/unload_kg_core.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/update_user.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/verify_system_status.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/whoami.py +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/SOURCES.txt +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/entry_points.txt +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/requires.txt +0 -0
- {trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/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: 2.10.
|
|
3
|
+
Version: 2.10.4
|
|
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
|
|
@@ -28,6 +28,7 @@ class KnowledgeLoader:
|
|
|
28
28
|
url=default_url,
|
|
29
29
|
token=None, workspace="default",
|
|
30
30
|
graph="",
|
|
31
|
+
format="turtle",
|
|
31
32
|
):
|
|
32
33
|
self.files = files
|
|
33
34
|
self.flow = flow
|
|
@@ -37,42 +38,57 @@ class KnowledgeLoader:
|
|
|
37
38
|
self.token = token
|
|
38
39
|
self.workspace = workspace
|
|
39
40
|
self.graph = graph
|
|
41
|
+
self.format = format
|
|
40
42
|
|
|
41
|
-
def
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
g = rdflib.Graph()
|
|
45
|
-
g.parse(file, format="turtle")
|
|
43
|
+
def _make_triple(self, s, p, o, graph=""):
|
|
44
|
+
s_value = Uri(str(s))
|
|
45
|
+
p_value = Uri(str(p))
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
if isinstance(o, rdflib.term.Literal):
|
|
48
|
+
o_value = Literal(
|
|
49
|
+
str(o),
|
|
50
|
+
datatype=str(o.datatype) if o.datatype else None,
|
|
51
|
+
language=str(o.language) if o.language else None,
|
|
52
|
+
)
|
|
53
|
+
else:
|
|
54
|
+
o_value = Uri(str(o))
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
o_value = Literal(
|
|
53
|
-
str(e[2]),
|
|
54
|
-
datatype=str(e[2].datatype) if e[2].datatype else None,
|
|
55
|
-
language=str(e[2].language) if e[2].language else None,
|
|
56
|
-
)
|
|
57
|
-
else:
|
|
58
|
-
o_value = Uri(str(e[2]))
|
|
56
|
+
return Triple(s=s_value, p=p_value, o=o_value, g=graph)
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
def load_triples_from_file(self, file) -> Iterator[Triple]:
|
|
59
|
+
"""Generator that yields Triple objects from a data file."""
|
|
60
|
+
|
|
61
|
+
if self.format == "trig":
|
|
62
|
+
ds = rdflib.Dataset()
|
|
63
|
+
ds.parse(file, format="trig")
|
|
64
|
+
for s, p, o, g in ds.quads((None, None, None, None)):
|
|
65
|
+
graph = str(g.identifier) if g.identifier else ""
|
|
66
|
+
if graph == "urn:x-rdflib:default":
|
|
67
|
+
graph = ""
|
|
68
|
+
yield self._make_triple(s, p, o, graph)
|
|
69
|
+
else:
|
|
70
|
+
g = rdflib.Graph()
|
|
71
|
+
g.parse(file, format="turtle")
|
|
72
|
+
for s, p, o in g:
|
|
73
|
+
yield self._make_triple(s, p, o, self.graph)
|
|
61
74
|
|
|
62
75
|
def load_entity_contexts_from_file(self, file) -> Iterator[Tuple[str, str]]:
|
|
63
|
-
"""Generator that yields (entity, context) tuples from a
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
"""Generator that yields (entity, context) tuples from a data file."""
|
|
77
|
+
|
|
78
|
+
if self.format == "trig":
|
|
79
|
+
ds = rdflib.Dataset()
|
|
80
|
+
ds.parse(file, format="trig")
|
|
81
|
+
for s, p, o, _g in ds.quads((None, None, None, None)):
|
|
82
|
+
if isinstance(o, rdflib.term.URIRef):
|
|
83
|
+
continue
|
|
84
|
+
yield (str(s), str(o))
|
|
85
|
+
else:
|
|
86
|
+
g = rdflib.Graph()
|
|
87
|
+
g.parse(file, format="turtle")
|
|
88
|
+
for s, p, o in g:
|
|
89
|
+
if isinstance(o, rdflib.term.URIRef):
|
|
90
|
+
continue
|
|
91
|
+
yield (str(s), str(o))
|
|
76
92
|
|
|
77
93
|
def run(self):
|
|
78
94
|
"""Load triples and entity contexts using Python API"""
|
|
@@ -189,13 +205,24 @@ def main():
|
|
|
189
205
|
help='Named graph URI (e.g. urn:graph:policy). Default: default graph'
|
|
190
206
|
)
|
|
191
207
|
|
|
208
|
+
parser.add_argument(
|
|
209
|
+
'-F', '--format',
|
|
210
|
+
choices=["turtle", "trig"],
|
|
211
|
+
default="turtle",
|
|
212
|
+
help='Input format (default: turtle)'
|
|
213
|
+
)
|
|
214
|
+
|
|
192
215
|
parser.add_argument(
|
|
193
216
|
'files', nargs='+',
|
|
194
|
-
help=f'
|
|
217
|
+
help=f'Data files to load'
|
|
195
218
|
)
|
|
196
219
|
|
|
197
220
|
args = parser.parse_args()
|
|
198
221
|
|
|
222
|
+
if args.format == "trig" and args.graph:
|
|
223
|
+
parser.error("--format trig and --graph are incompatible: "
|
|
224
|
+
"named graphs come from the TriG data")
|
|
225
|
+
|
|
199
226
|
while True:
|
|
200
227
|
|
|
201
228
|
try:
|
|
@@ -208,6 +235,7 @@ def main():
|
|
|
208
235
|
collection=args.collection,
|
|
209
236
|
workspace=args.workspace,
|
|
210
237
|
graph=args.graph,
|
|
238
|
+
format=args.format,
|
|
211
239
|
)
|
|
212
240
|
|
|
213
241
|
loader.run()
|
|
@@ -7,7 +7,7 @@ import argparse
|
|
|
7
7
|
import json
|
|
8
8
|
import sys
|
|
9
9
|
|
|
10
|
-
from ._iam import DEFAULT_URL, DEFAULT_TOKEN,
|
|
10
|
+
from ._iam import DEFAULT_URL, DEFAULT_TOKEN, call_iam, run_main
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def do_mint_token(args):
|
|
@@ -21,15 +21,19 @@ def do_mint_token(args):
|
|
|
21
21
|
print("--user-context must be a JSON object", file=sys.stderr)
|
|
22
22
|
sys.exit(1)
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
"
|
|
24
|
+
req = {
|
|
25
|
+
"operation": "mint-token",
|
|
26
26
|
"workspace": args.workspace,
|
|
27
|
-
"
|
|
27
|
+
"user_context_json": json.dumps(user_context),
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
if args.user_id:
|
|
31
|
+
req["user_id"] = args.user_id
|
|
32
|
+
elif args.username:
|
|
33
|
+
req["username"] = args.username
|
|
34
|
+
# --self: leave both empty; the gateway populates actor
|
|
35
|
+
|
|
36
|
+
resp = call_iam(args.api_url, args.token, req)
|
|
33
37
|
|
|
34
38
|
jwt = resp.get("jwt", "")
|
|
35
39
|
expires = resp.get("jwt_expires", "")
|
|
@@ -51,10 +55,6 @@ def main():
|
|
|
51
55
|
"-t", "--token", default=DEFAULT_TOKEN,
|
|
52
56
|
help="Admin auth token (JWT or API key)",
|
|
53
57
|
)
|
|
54
|
-
parser.add_argument(
|
|
55
|
-
"--user-id", required=True,
|
|
56
|
-
help="User ID for the minted token's subject",
|
|
57
|
-
)
|
|
58
58
|
parser.add_argument(
|
|
59
59
|
"-w", "--workspace", required=True,
|
|
60
60
|
help="Target workspace for the minted token",
|
|
@@ -63,6 +63,21 @@ def main():
|
|
|
63
63
|
"--user-context", required=True,
|
|
64
64
|
help="UserContext as a JSON string",
|
|
65
65
|
)
|
|
66
|
+
|
|
67
|
+
target = parser.add_mutually_exclusive_group(required=True)
|
|
68
|
+
target.add_argument(
|
|
69
|
+
"--user-id",
|
|
70
|
+
help="User ID (UUID) for the minted token's subject",
|
|
71
|
+
)
|
|
72
|
+
target.add_argument(
|
|
73
|
+
"--username",
|
|
74
|
+
help="Username to resolve to a user ID",
|
|
75
|
+
)
|
|
76
|
+
target.add_argument(
|
|
77
|
+
"--self", dest="use_self", action="store_true",
|
|
78
|
+
help="Mint token for the caller's own user ID",
|
|
79
|
+
)
|
|
80
|
+
|
|
66
81
|
run_main(do_mint_token, parser)
|
|
67
82
|
|
|
68
83
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.10.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 2.10.
|
|
3
|
+
Version: 2.10.4
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.10.3"
|
|
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-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/invoke_document_embeddings.py
RENAMED
|
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-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/belgian-beer.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/history-of-pets.md
RENAMED
|
File without changes
|
{trustgraph_cli-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/sample_documents/metadata.json
RENAMED
|
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-2.10.3 → trustgraph_cli-2.10.4}/trustgraph/cli/show_extraction_provenance.py
RENAMED
|
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-2.10.3 → trustgraph_cli-2.10.4}/trustgraph_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|