trustgraph-cli 1.7.2__tar.gz → 1.8.14__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.

Files changed (78) hide show
  1. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/PKG-INFO +2 -2
  2. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/pyproject.toml +5 -5
  3. trustgraph_cli-1.7.2/trustgraph/cli/delete_flow_class.py → trustgraph_cli-1.8.14/trustgraph/cli/delete_flow_blueprint.py +9 -9
  4. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/dump_queues.py +7 -6
  5. trustgraph_cli-1.7.2/trustgraph/cli/get_flow_class.py → trustgraph_cli-1.8.14/trustgraph/cli/get_flow_blueprint.py +9 -9
  6. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_agent.py +16 -5
  7. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_document_rag.py +2 -2
  8. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_graph_rag.py +2 -2
  9. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/list_collections.py +3 -5
  10. trustgraph_cli-1.7.2/trustgraph/cli/put_flow_class.py → trustgraph_cli-1.8.14/trustgraph/cli/put_flow_blueprint.py +10 -10
  11. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/set_collection.py +0 -1
  12. trustgraph_cli-1.7.2/trustgraph/cli/show_flow_classes.py → trustgraph_cli-1.8.14/trustgraph/cli/show_flow_blueprints.py +13 -13
  13. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_flow_state.py +3 -3
  14. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_flows.py +17 -17
  15. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_parameter_types.py +3 -3
  16. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_token_costs.py +2 -2
  17. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/start_flow.py +6 -6
  18. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/verify_system_status.py +9 -9
  19. trustgraph_cli-1.8.14/trustgraph/cli_version.py +1 -0
  20. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph_cli.egg-info/PKG-INFO +2 -2
  21. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph_cli.egg-info/SOURCES.txt +4 -4
  22. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph_cli.egg-info/entry_points.txt +4 -4
  23. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph_cli.egg-info/requires.txt +1 -1
  24. trustgraph_cli-1.7.2/trustgraph/cli_version.py +0 -1
  25. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/README.md +0 -0
  26. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/setup.cfg +0 -0
  27. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/__init__.py +0 -0
  28. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/add_library_document.py +0 -0
  29. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/delete_collection.py +0 -0
  30. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/delete_config_item.py +0 -0
  31. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/delete_kg_core.py +0 -0
  32. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/delete_mcp_tool.py +0 -0
  33. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/delete_tool.py +0 -0
  34. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/dump_msgpack.py +0 -0
  35. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/get_config_item.py +0 -0
  36. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/get_kg_core.py +0 -0
  37. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/graph_to_turtle.py +0 -0
  38. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/init_pulsar_manager.py +0 -0
  39. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/init_trustgraph.py +0 -0
  40. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_llm.py +0 -0
  41. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_mcp_tool.py +0 -0
  42. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_nlp_query.py +0 -0
  43. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_objects_query.py +0 -0
  44. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_prompt.py +0 -0
  45. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/invoke_structured_query.py +0 -0
  46. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/list_config_items.py +0 -0
  47. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_doc_embeds.py +0 -0
  48. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_kg_core.py +0 -0
  49. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_knowledge.py +0 -0
  50. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_pdf.py +0 -0
  51. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_sample_documents.py +0 -0
  52. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_structured_data.py +0 -0
  53. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_text.py +0 -0
  54. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/load_turtle.py +0 -0
  55. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/put_config_item.py +0 -0
  56. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/put_kg_core.py +0 -0
  57. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/remove_library_document.py +0 -0
  58. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/save_doc_embeds.py +0 -0
  59. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/set_mcp_tool.py +0 -0
  60. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/set_prompt.py +0 -0
  61. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/set_token_costs.py +0 -0
  62. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/set_tool.py +0 -0
  63. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_config.py +0 -0
  64. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_graph.py +0 -0
  65. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_kg_cores.py +0 -0
  66. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_library_documents.py +0 -0
  67. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_library_processing.py +0 -0
  68. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_mcp_tools.py +0 -0
  69. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_processor_state.py +0 -0
  70. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_prompts.py +0 -0
  71. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_token_rate.py +0 -0
  72. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/show_tools.py +0 -0
  73. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/start_library_processing.py +0 -0
  74. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/stop_flow.py +0 -0
  75. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/stop_library_processing.py +0 -0
  76. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph/cli/unload_kg_core.py +0 -0
  77. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
  78. {trustgraph_cli-1.7.2 → trustgraph_cli-1.8.14}/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.7.2
3
+ Version: 1.8.14
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
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Operating System :: OS Independent
9
9
  Requires-Python: >=3.8
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: trustgraph-base<1.8,>=1.7
11
+ Requires-Dist: trustgraph-base<1.9,>=1.8
12
12
  Requires-Dist: requests
13
13
  Requires-Dist: pulsar-client
14
14
  Requires-Dist: aiohttp
@@ -10,7 +10,7 @@ description = "TrustGraph provides a means to run a pipeline of flexible AI proc
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.8"
12
12
  dependencies = [
13
- "trustgraph-base>=1.7,<1.8",
13
+ "trustgraph-base>=1.8,<1.9",
14
14
  "requests",
15
15
  "pulsar-client",
16
16
  "aiohttp",
@@ -29,13 +29,13 @@ Homepage = "https://github.com/trustgraph-ai/trustgraph"
29
29
 
30
30
  [project.scripts]
31
31
  tg-add-library-document = "trustgraph.cli.add_library_document:main"
32
- tg-delete-flow-class = "trustgraph.cli.delete_flow_class:main"
32
+ tg-delete-flow-blueprint = "trustgraph.cli.delete_flow_blueprint:main"
33
33
  tg-delete-mcp-tool = "trustgraph.cli.delete_mcp_tool:main"
34
34
  tg-delete-kg-core = "trustgraph.cli.delete_kg_core:main"
35
35
  tg-delete-tool = "trustgraph.cli.delete_tool:main"
36
36
  tg-dump-msgpack = "trustgraph.cli.dump_msgpack:main"
37
37
  tg-dump-queues = "trustgraph.cli.dump_queues:main"
38
- tg-get-flow-class = "trustgraph.cli.get_flow_class:main"
38
+ tg-get-flow-blueprint = "trustgraph.cli.get_flow_blueprint:main"
39
39
  tg-get-kg-core = "trustgraph.cli.get_kg_core:main"
40
40
  tg-graph-to-turtle = "trustgraph.cli.graph_to_turtle:main"
41
41
  tg-init-trustgraph = "trustgraph.cli.init_trustgraph:main"
@@ -56,7 +56,7 @@ tg-load-text = "trustgraph.cli.load_text:main"
56
56
  tg-load-turtle = "trustgraph.cli.load_turtle:main"
57
57
  tg-load-knowledge = "trustgraph.cli.load_knowledge:main"
58
58
  tg-load-structured-data = "trustgraph.cli.load_structured_data:main"
59
- tg-put-flow-class = "trustgraph.cli.put_flow_class:main"
59
+ tg-put-flow-blueprint = "trustgraph.cli.put_flow_blueprint:main"
60
60
  tg-put-kg-core = "trustgraph.cli.put_kg_core:main"
61
61
  tg-remove-library-document = "trustgraph.cli.remove_library_document:main"
62
62
  tg-save-doc-embeds = "trustgraph.cli.save_doc_embeds:main"
@@ -65,7 +65,7 @@ tg-set-prompt = "trustgraph.cli.set_prompt:main"
65
65
  tg-set-token-costs = "trustgraph.cli.set_token_costs:main"
66
66
  tg-set-tool = "trustgraph.cli.set_tool:main"
67
67
  tg-show-config = "trustgraph.cli.show_config:main"
68
- tg-show-flow-classes = "trustgraph.cli.show_flow_classes:main"
68
+ tg-show-flow-blueprints = "trustgraph.cli.show_flow_blueprints:main"
69
69
  tg-show-flow-state = "trustgraph.cli.show_flow_state:main"
70
70
  tg-show-flows = "trustgraph.cli.show_flows:main"
71
71
  tg-show-graph = "trustgraph.cli.show_graph:main"
@@ -1,5 +1,5 @@
1
1
  """
2
- Deletes a flow class
2
+ Deletes a flow blueprint
3
3
  """
4
4
 
5
5
  import argparse
@@ -10,16 +10,16 @@ import json
10
10
 
11
11
  default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
12
12
 
13
- def delete_flow_class(url, class_name):
13
+ def delete_flow_blueprint(url, blueprint_name):
14
14
 
15
15
  api = Api(url).flow()
16
16
 
17
- class_names = api.delete_class(class_name)
17
+ blueprint_names = api.delete_blueprint(blueprint_name)
18
18
 
19
19
  def main():
20
20
 
21
21
  parser = argparse.ArgumentParser(
22
- prog='tg-delete-flow-class',
22
+ prog='tg-delete-flow-blueprint',
23
23
  description=__doc__,
24
24
  )
25
25
 
@@ -30,17 +30,17 @@ def main():
30
30
  )
31
31
 
32
32
  parser.add_argument(
33
- '-n', '--class-name',
34
- help=f'Flow class name',
33
+ '-n', '--blueprint-name',
34
+ help=f'Flow blueprint name',
35
35
  )
36
36
 
37
37
  args = parser.parse_args()
38
38
 
39
39
  try:
40
40
 
41
- delete_flow_class(
41
+ delete_flow_blueprint(
42
42
  url=args.api_url,
43
- class_name=args.class_name,
43
+ blueprint_name=args.blueprint_name,
44
44
  )
45
45
 
46
46
  except Exception as e:
@@ -48,4 +48,4 @@ def main():
48
48
  print("Exception:", e, flush=True)
49
49
 
50
50
  if __name__ == "__main__":
51
- main()
51
+ main()
@@ -17,6 +17,7 @@ from datetime import datetime
17
17
  import argparse
18
18
 
19
19
  from trustgraph.base.subscriber import Subscriber
20
+ from trustgraph.base.pubsub import get_pubsub
20
21
 
21
22
  def format_message(queue_name, msg):
22
23
  """Format a message with timestamp and queue name."""
@@ -167,11 +168,11 @@ async def async_main(queues, output_file, pulsar_host, listener_name, subscriber
167
168
  print(f"Mode: {'append' if append_mode else 'overwrite'}")
168
169
  print(f"Press Ctrl+C to stop\n")
169
170
 
170
- # Connect to Pulsar
171
+ # Create backend connection
171
172
  try:
172
- client = pulsar.Client(pulsar_host, listener_name=listener_name)
173
+ backend = get_pubsub(pulsar_host=pulsar_host, pulsar_listener=listener_name, pubsub_backend='pulsar')
173
174
  except Exception as e:
174
- print(f"Error connecting to Pulsar at {pulsar_host}: {e}", file=sys.stderr)
175
+ print(f"Error connecting to backend at {pulsar_host}: {e}", file=sys.stderr)
175
176
  sys.exit(1)
176
177
 
177
178
  # Create Subscribers and central queue
@@ -181,7 +182,7 @@ async def async_main(queues, output_file, pulsar_host, listener_name, subscriber
181
182
  for queue_name in queues:
182
183
  try:
183
184
  sub = Subscriber(
184
- client=client,
185
+ backend=backend,
185
186
  topic=queue_name,
186
187
  subscription=subscriber_name,
187
188
  consumer_name=f"{subscriber_name}-{queue_name}",
@@ -195,7 +196,7 @@ async def async_main(queues, output_file, pulsar_host, listener_name, subscriber
195
196
 
196
197
  if not subscribers:
197
198
  print("\nNo subscribers created. Exiting.", file=sys.stderr)
198
- client.close()
199
+ backend.close()
199
200
  sys.exit(1)
200
201
 
201
202
  print(f"\nListening for messages...\n")
@@ -256,7 +257,7 @@ async def async_main(queues, output_file, pulsar_host, listener_name, subscriber
256
257
  # Clean shutdown of Subscribers
257
258
  for _, sub in subscribers:
258
259
  await sub.stop()
259
- client.close()
260
+ backend.close()
260
261
 
261
262
  print(f"\nMessages logged to: {output_file}")
262
263
 
@@ -1,5 +1,5 @@
1
1
  """
2
- Outputs a flow class definition in JSON format.
2
+ Outputs a flow blueprint definition in JSON format.
3
3
  """
4
4
 
5
5
  import argparse
@@ -10,18 +10,18 @@ import json
10
10
 
11
11
  default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
12
12
 
13
- def get_flow_class(url, class_name):
13
+ def get_flow_blueprint(url, blueprint_name):
14
14
 
15
15
  api = Api(url).flow()
16
16
 
17
- cls = api.get_class(class_name)
17
+ cls = api.get_blueprint(blueprint_name)
18
18
 
19
19
  print(json.dumps(cls, indent=4))
20
20
 
21
21
  def main():
22
22
 
23
23
  parser = argparse.ArgumentParser(
24
- prog='tg-get-flow-class',
24
+ prog='tg-get-flow-blueprint',
25
25
  description=__doc__,
26
26
  )
27
27
 
@@ -32,18 +32,18 @@ def main():
32
32
  )
33
33
 
34
34
  parser.add_argument(
35
- '-n', '--class-name',
35
+ '-n', '--blueprint-name',
36
36
  required=True,
37
- help=f'Flow class name',
37
+ help=f'Flow blueprint name',
38
38
  )
39
39
 
40
40
  args = parser.parse_args()
41
41
 
42
42
  try:
43
43
 
44
- get_flow_class(
44
+ get_flow_blueprint(
45
45
  url=args.api_url,
46
- class_name=args.class_name,
46
+ blueprint_name=args.blueprint_name,
47
47
  )
48
48
 
49
49
  except Exception as e:
@@ -51,4 +51,4 @@ def main():
51
51
  print("Exception:", e, flush=True)
52
52
 
53
53
  if __name__ == "__main__":
54
- main()
54
+ main()
@@ -178,11 +178,22 @@ def question(
178
178
  print()
179
179
 
180
180
  else:
181
- # Non-streaming response
182
- if "answer" in response:
183
- print(response["answer"])
184
- if "error" in response:
185
- raise RuntimeError(response["error"])
181
+ # Non-streaming response - but agents use multipart messaging
182
+ # so we iterate through the chunks (which are complete messages, not text chunks)
183
+ for chunk in response:
184
+ # Display thoughts if verbose
185
+ if chunk.chunk_type == "thought" and verbose:
186
+ output(wrap(chunk.content), "\U0001f914 ")
187
+ print()
188
+
189
+ # Display observations if verbose
190
+ elif chunk.chunk_type == "observation" and verbose:
191
+ output(wrap(chunk.content), "\U0001f4a1 ")
192
+ print()
193
+
194
+ # Display answer
195
+ elif chunk.chunk_type == "final-answer" or chunk.chunk_type == "answer":
196
+ print(chunk.content)
186
197
 
187
198
  finally:
188
199
  # Clean up socket connection
@@ -24,7 +24,7 @@ def question(url, flow_id, question, user, collection, doc_limit, streaming=True
24
24
 
25
25
  try:
26
26
  response = flow.document_rag(
27
- question=question,
27
+ query=question,
28
28
  user=user,
29
29
  collection=collection,
30
30
  doc_limit=doc_limit,
@@ -42,7 +42,7 @@ def question(url, flow_id, question, user, collection, doc_limit, streaming=True
42
42
  # Use REST API for non-streaming
43
43
  flow = api.flow().id(flow_id)
44
44
  resp = flow.document_rag(
45
- question=question,
45
+ query=question,
46
46
  user=user,
47
47
  collection=collection,
48
48
  doc_limit=doc_limit,
@@ -30,7 +30,7 @@ def question(
30
30
 
31
31
  try:
32
32
  response = flow.graph_rag(
33
- question=question,
33
+ query=question,
34
34
  user=user,
35
35
  collection=collection,
36
36
  entity_limit=entity_limit,
@@ -51,7 +51,7 @@ def question(
51
51
  # Use REST API for non-streaming
52
52
  flow = api.flow().id(flow_id)
53
53
  resp = flow.graph_rag(
54
- question=question,
54
+ query=question,
55
55
  user=user,
56
56
  collection=collection,
57
57
  entity_limit=entity_limit,
@@ -28,19 +28,17 @@ def list_collections(url, user, tag_filter):
28
28
  collection.collection,
29
29
  collection.name,
30
30
  collection.description,
31
- ", ".join(collection.tags),
32
- collection.created_at,
33
- collection.updated_at
31
+ ", ".join(collection.tags)
34
32
  ])
35
33
 
36
- headers = ["Collection", "Name", "Description", "Tags", "Created", "Updated"]
34
+ headers = ["Collection", "Name", "Description", "Tags"]
37
35
 
38
36
  print(tabulate.tabulate(
39
37
  table,
40
38
  headers=headers,
41
39
  tablefmt="pretty",
42
40
  stralign="left",
43
- maxcolwidths=[20, 30, 50, 30, 19, 19],
41
+ maxcolwidths=[20, 30, 50, 30],
44
42
  ))
45
43
 
46
44
  def main():
@@ -1,6 +1,6 @@
1
1
  """
2
- Uploads a flow class definition. You can take the output of
3
- tg-get-flow-class and load it back in using this utility.
2
+ Uploads a flow blueprint definition. You can take the output of
3
+ tg-get-flow-blueprint and load it back in using this utility.
4
4
  """
5
5
 
6
6
  import argparse
@@ -11,16 +11,16 @@ import json
11
11
  default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
12
12
  default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
13
13
 
14
- def put_flow_class(url, class_name, config, token=None):
14
+ def put_flow_blueprint(url, blueprint_name, config, token=None):
15
15
 
16
16
  api = Api(url, token=token)
17
17
 
18
- class_names = api.flow().put_class(class_name, config)
18
+ blueprint_names = api.flow().put_blueprint(blueprint_name, config)
19
19
 
20
20
  def main():
21
21
 
22
22
  parser = argparse.ArgumentParser(
23
- prog='tg-put-flow-class',
23
+ prog='tg-put-flow-blueprint',
24
24
  description=__doc__,
25
25
  )
26
26
 
@@ -37,8 +37,8 @@ def main():
37
37
  )
38
38
 
39
39
  parser.add_argument(
40
- '-n', '--class-name',
41
- help=f'Flow class name',
40
+ '-n', '--blueprint-name',
41
+ help=f'Flow blueprint name',
42
42
  )
43
43
 
44
44
  parser.add_argument(
@@ -50,9 +50,9 @@ def main():
50
50
 
51
51
  try:
52
52
 
53
- put_flow_class(
53
+ put_flow_blueprint(
54
54
  url=args.api_url,
55
- class_name=args.class_name,
55
+ blueprint_name=args.blueprint_name,
56
56
  config=json.loads(args.config),
57
57
  token=args.token,
58
58
  )
@@ -62,4 +62,4 @@ def main():
62
62
  print("Exception:", e, flush=True)
63
63
 
64
64
  if __name__ == "__main__":
65
- main()
65
+ main()
@@ -31,7 +31,6 @@ def set_collection(url, user, collection, name, description, tags, token=None):
31
31
  table.append(("Name", result.name))
32
32
  table.append(("Description", result.description))
33
33
  table.append(("Tags", ", ".join(result.tags)))
34
- table.append(("Updated", result.updated_at))
35
34
 
36
35
  print(tabulate.tabulate(
37
36
  table,
@@ -1,5 +1,5 @@
1
1
  """
2
- Shows all defined flow classes.
2
+ Shows all defined flow blueprints.
3
3
  """
4
4
 
5
5
  import argparse
@@ -16,7 +16,7 @@ def format_parameters(params_metadata, config_api):
16
16
  Format parameter metadata for display
17
17
 
18
18
  Args:
19
- params_metadata: Parameter definitions from flow class
19
+ params_metadata: Parameter definitions from flow blueprint
20
20
  config_api: API client to get parameter type information
21
21
 
22
22
  Returns:
@@ -41,7 +41,7 @@ def format_parameters(params_metadata, config_api):
41
41
  type_info = param_type
42
42
  if config_api:
43
43
  try:
44
- key = ConfigKey("parameter-types", param_type)
44
+ key = ConfigKey("parameter-type", param_type)
45
45
  type_def_value = config_api.get([key])[0].value
46
46
  param_type_def = json.loads(type_def_value)
47
47
 
@@ -58,23 +58,23 @@ def format_parameters(params_metadata, config_api):
58
58
 
59
59
  return "\n".join(param_list)
60
60
 
61
- def show_flow_classes(url, token=None):
61
+ def show_flow_blueprints(url, token=None):
62
62
 
63
63
  api = Api(url, token=token)
64
64
  flow_api = api.flow()
65
65
  config_api = api.config()
66
66
 
67
- class_names = flow_api.list_classes()
67
+ blueprint_names = flow_api.list_blueprints()
68
68
 
69
- if len(class_names) == 0:
70
- print("No flow classes.")
69
+ if len(blueprint_names) == 0:
70
+ print("No flow blueprints.")
71
71
  return
72
72
 
73
- for class_name in class_names:
74
- cls = flow_api.get_class(class_name)
73
+ for blueprint_name in blueprint_names:
74
+ cls = flow_api.get_blueprint(blueprint_name)
75
75
 
76
76
  table = []
77
- table.append(("name", class_name))
77
+ table.append(("name", blueprint_name))
78
78
  table.append(("description", cls.get("description", "")))
79
79
 
80
80
  tags = cls.get("tags", [])
@@ -97,7 +97,7 @@ def show_flow_classes(url, token=None):
97
97
  def main():
98
98
 
99
99
  parser = argparse.ArgumentParser(
100
- prog='tg-show-flow-classes',
100
+ prog='tg-show-flow-blueprints',
101
101
  description=__doc__,
102
102
  )
103
103
 
@@ -117,7 +117,7 @@ def main():
117
117
 
118
118
  try:
119
119
 
120
- show_flow_classes(
120
+ show_flow_blueprints(
121
121
  url=args.api_url,
122
122
  token=args.token,
123
123
  )
@@ -127,4 +127,4 @@ def main():
127
127
  print("Exception:", e, flush=True)
128
128
 
129
129
  if __name__ == "__main__":
130
- main()
130
+ main()
@@ -16,15 +16,15 @@ def dump_status(metrics_url, api_url, flow_id, token=None):
16
16
  api = Api(api_url, token=token).flow()
17
17
 
18
18
  flow = api.get(flow_id)
19
- class_name = flow["class-name"]
19
+ blueprint_name = flow["blueprint-name"]
20
20
 
21
21
  print()
22
22
  print(f"Flow {flow_id}")
23
23
  show_processors(metrics_url, flow_id)
24
24
 
25
25
  print()
26
- print(f"Class {class_name}")
27
- show_processors(metrics_url, class_name)
26
+ print(f"Blueprint {blueprint_name}")
27
+ show_processors(metrics_url, blueprint_name)
28
28
 
29
29
  print()
30
30
 
@@ -13,7 +13,7 @@ default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
13
13
 
14
14
  def get_interface(config_api, i):
15
15
 
16
- key = ConfigKey("interface-descriptions", i)
16
+ key = ConfigKey("interface-description", i)
17
17
 
18
18
  value = config_api.get([key])[0].value
19
19
 
@@ -70,13 +70,13 @@ def get_enum_description(param_value, param_type_def):
70
70
  # If not found in enum, return original value
71
71
  return param_value
72
72
 
73
- def format_parameters(flow_params, class_params_metadata, config_api):
73
+ def format_parameters(flow_params, blueprint_params_metadata, config_api):
74
74
  """
75
75
  Format flow parameters with their human-readable descriptions
76
76
 
77
77
  Args:
78
78
  flow_params: The actual parameter values used in the flow
79
- class_params_metadata: The parameter metadata from the flow class definition
79
+ blueprint_params_metadata: The parameter metadata from the flow blueprint definition
80
80
  config_api: API client to retrieve parameter type definitions
81
81
 
82
82
  Returns:
@@ -89,7 +89,7 @@ def format_parameters(flow_params, class_params_metadata, config_api):
89
89
 
90
90
  # Sort parameters by order if available
91
91
  sorted_params = sorted(
92
- class_params_metadata.items(),
92
+ blueprint_params_metadata.items(),
93
93
  key=lambda x: x[1].get("order", 999)
94
94
  )
95
95
 
@@ -105,7 +105,7 @@ def format_parameters(flow_params, class_params_metadata, config_api):
105
105
  if param_type and config_api:
106
106
  try:
107
107
  from trustgraph.api import ConfigKey
108
- key = ConfigKey("parameter-types", param_type)
108
+ key = ConfigKey("parameter-type", param_type)
109
109
  type_def_value = config_api.get([key])[0].value
110
110
  param_type_def = json.loads(type_def_value)
111
111
  display_value = get_enum_description(value, param_type_def)
@@ -122,9 +122,9 @@ def format_parameters(flow_params, class_params_metadata, config_api):
122
122
 
123
123
  param_list.append(line)
124
124
 
125
- # Add any parameters that aren't in the class metadata (shouldn't happen normally)
125
+ # Add any parameters that aren't in the blueprint metadata (shouldn't happen normally)
126
126
  for param_name, value in flow_params.items():
127
- if param_name not in class_params_metadata:
127
+ if param_name not in blueprint_params_metadata:
128
128
  param_list.append(f"• {param_name}: {value} (undefined)")
129
129
 
130
130
  return "\n".join(param_list) if param_list else "None"
@@ -135,7 +135,7 @@ def show_flows(url, token=None):
135
135
  config_api = api.config()
136
136
  flow_api = api.flow()
137
137
 
138
- interface_names = config_api.list("interface-descriptions")
138
+ interface_names = config_api.list("interface-description")
139
139
 
140
140
  interface_defs = {
141
141
  i: get_interface(config_api, i)
@@ -156,24 +156,24 @@ def show_flows(url, token=None):
156
156
 
157
157
  table = []
158
158
  table.append(("id", id))
159
- table.append(("class", flow.get("class-name", "")))
159
+ table.append(("blueprint", flow.get("blueprint-name", "")))
160
160
  table.append(("desc", flow.get("description", "")))
161
161
 
162
162
  # Display parameters with human-readable descriptions
163
163
  parameters = flow.get("parameters", {})
164
164
  if parameters:
165
- # Try to get the flow class definition for parameter metadata
166
- class_name = flow.get("class-name", "")
167
- if class_name:
165
+ # Try to get the flow blueprint definition for parameter metadata
166
+ blueprint_name = flow.get("blueprint-name", "")
167
+ if blueprint_name:
168
168
  try:
169
- flow_class = flow_api.get_class(class_name)
170
- class_params_metadata = flow_class.get("parameters", {})
171
- param_str = format_parameters(parameters, class_params_metadata, config_api)
169
+ flow_blueprint = flow_api.get_blueprint(blueprint_name)
170
+ blueprint_params_metadata = flow_blueprint.get("parameters", {})
171
+ param_str = format_parameters(parameters, blueprint_params_metadata, config_api)
172
172
  except Exception as e:
173
- # Fallback to JSON if we can't get the class definition
173
+ # Fallback to JSON if we can't get the blueprint definition
174
174
  param_str = json.dumps(parameters, indent=2)
175
175
  else:
176
- # No class name, fallback to JSON
176
+ # No blueprint name, fallback to JSON
177
177
  param_str = json.dumps(parameters, indent=2)
178
178
 
179
179
  table.append(("parameters", param_str))
@@ -85,7 +85,7 @@ def show_parameter_types(url, token=None):
85
85
 
86
86
  # Get list of all parameter types
87
87
  try:
88
- param_type_names = config_api.list("parameter-types")
88
+ param_type_names = config_api.list("parameter-type")
89
89
  except Exception as e:
90
90
  print(f"Error retrieving parameter types: {e}")
91
91
  return
@@ -97,7 +97,7 @@ def show_parameter_types(url, token=None):
97
97
  for param_type_name in param_type_names:
98
98
  try:
99
99
  # Get the parameter type definition
100
- key = ConfigKey("parameter-types", param_type_name)
100
+ key = ConfigKey("parameter-type", param_type_name)
101
101
  type_def_value = config_api.get([key])[0].value
102
102
  param_type_def = json.loads(type_def_value)
103
103
 
@@ -179,7 +179,7 @@ def show_specific_parameter_type(url, param_type_name, token=None):
179
179
 
180
180
  try:
181
181
  # Get the parameter type definition
182
- key = ConfigKey("parameter-types", param_type_name)
182
+ key = ConfigKey("parameter-type", param_type_name)
183
183
  type_def_value = config_api.get([key])[0].value
184
184
  param_type_def = json.loads(type_def_value)
185
185
 
@@ -18,7 +18,7 @@ def show_config(url, token=None):
18
18
 
19
19
  api = Api(url, token=token).config()
20
20
 
21
- models = api.list("token-costs")
21
+ models = api.list("token-cost")
22
22
 
23
23
  costs = []
24
24
 
@@ -29,7 +29,7 @@ def show_config(url, token=None):
29
29
 
30
30
  try:
31
31
  values = json.loads(api.get([
32
- ConfigKey(type="token-costs", key=model),
32
+ ConfigKey(type="token-cost", key=model),
33
33
  ])[0].value)
34
34
  costs.append((
35
35
  model,
@@ -1,5 +1,5 @@
1
1
  """
2
- Starts a processing flow using a defined flow class.
2
+ Starts a processing flow using a defined flow blueprint.
3
3
 
4
4
  Parameters can be provided in three ways:
5
5
  1. As key=value pairs: --param model=gpt-4 --param temp=0.7
@@ -19,12 +19,12 @@ import json
19
19
  default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
20
20
  default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
21
21
 
22
- def start_flow(url, class_name, flow_id, description, parameters=None, token=None):
22
+ def start_flow(url, blueprint_name, flow_id, description, parameters=None, token=None):
23
23
 
24
24
  api = Api(url, token=token).flow()
25
25
 
26
26
  api.start(
27
- class_name = class_name,
27
+ blueprint_name = blueprint_name,
28
28
  id = flow_id,
29
29
  description = description,
30
30
  parameters = parameters,
@@ -50,9 +50,9 @@ def main():
50
50
  )
51
51
 
52
52
  parser.add_argument(
53
- '-n', '--class-name',
53
+ '-n', '--blueprint-name',
54
54
  required=True,
55
- help=f'Flow class name',
55
+ help=f'Flow blueprint name',
56
56
  )
57
57
 
58
58
  parser.add_argument(
@@ -115,7 +115,7 @@ def main():
115
115
 
116
116
  start_flow(
117
117
  url = args.api_url,
118
- class_name = args.class_name,
118
+ blueprint_name = args.blueprint_name,
119
119
  flow_id = args.flow_id,
120
120
  description = args.description,
121
121
  parameters = parameters,
@@ -194,21 +194,21 @@ def check_processors(url: str, min_processors: int, timeout: int, token: Optiona
194
194
  return False, f"Processor check error: {e}"
195
195
 
196
196
 
197
- def check_flow_classes(url: str, timeout: int, token: Optional[str] = None) -> Tuple[bool, str]:
198
- """Check if flow classes are loaded."""
197
+ def check_flow_blueprints(url: str, timeout: int, token: Optional[str] = None) -> Tuple[bool, str]:
198
+ """Check if flow blueprints are loaded."""
199
199
  try:
200
200
  api = Api(url, token=token, timeout=timeout)
201
201
  flow_api = api.flow()
202
202
 
203
- classes = flow_api.list_classes()
203
+ blueprints = flow_api.list_blueprints()
204
204
 
205
- if classes and len(classes) > 0:
206
- return True, f"Found {len(classes)} flow class(es)"
205
+ if blueprints and len(blueprints) > 0:
206
+ return True, f"Found {len(blueprints)} flow blueprint(s)"
207
207
  else:
208
- return False, "No flow classes found"
208
+ return False, "No flow blueprints found"
209
209
 
210
210
  except Exception as e:
211
- return False, f"Flow classes check error: {e}"
211
+ return False, f"Flow blueprints check error: {e}"
212
212
 
213
213
 
214
214
  def check_flows(url: str, timeout: int, token: Optional[str] = None) -> Tuple[bool, str]:
@@ -416,8 +416,8 @@ def main():
416
416
  )
417
417
 
418
418
  checker.run_check(
419
- "Flow Classes",
420
- check_flow_classes,
419
+ "Flow Blueprints",
420
+ check_flow_blueprints,
421
421
  args.api_url,
422
422
  args.check_timeout,
423
423
  args.token
@@ -0,0 +1 @@
1
+ __version__ = "1.8.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-cli
3
- Version: 1.7.2
3
+ Version: 1.8.14
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
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Operating System :: OS Independent
9
9
  Requires-Python: >=3.8
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: trustgraph-base<1.8,>=1.7
11
+ Requires-Dist: trustgraph-base<1.9,>=1.8
12
12
  Requires-Dist: requests
13
13
  Requires-Dist: pulsar-client
14
14
  Requires-Dist: aiohttp
@@ -5,14 +5,14 @@ trustgraph/cli/__init__.py
5
5
  trustgraph/cli/add_library_document.py
6
6
  trustgraph/cli/delete_collection.py
7
7
  trustgraph/cli/delete_config_item.py
8
- trustgraph/cli/delete_flow_class.py
8
+ trustgraph/cli/delete_flow_blueprint.py
9
9
  trustgraph/cli/delete_kg_core.py
10
10
  trustgraph/cli/delete_mcp_tool.py
11
11
  trustgraph/cli/delete_tool.py
12
12
  trustgraph/cli/dump_msgpack.py
13
13
  trustgraph/cli/dump_queues.py
14
14
  trustgraph/cli/get_config_item.py
15
- trustgraph/cli/get_flow_class.py
15
+ trustgraph/cli/get_flow_blueprint.py
16
16
  trustgraph/cli/get_kg_core.py
17
17
  trustgraph/cli/graph_to_turtle.py
18
18
  trustgraph/cli/init_pulsar_manager.py
@@ -37,7 +37,7 @@ trustgraph/cli/load_structured_data.py
37
37
  trustgraph/cli/load_text.py
38
38
  trustgraph/cli/load_turtle.py
39
39
  trustgraph/cli/put_config_item.py
40
- trustgraph/cli/put_flow_class.py
40
+ trustgraph/cli/put_flow_blueprint.py
41
41
  trustgraph/cli/put_kg_core.py
42
42
  trustgraph/cli/remove_library_document.py
43
43
  trustgraph/cli/save_doc_embeds.py
@@ -47,7 +47,7 @@ trustgraph/cli/set_prompt.py
47
47
  trustgraph/cli/set_token_costs.py
48
48
  trustgraph/cli/set_tool.py
49
49
  trustgraph/cli/show_config.py
50
- trustgraph/cli/show_flow_classes.py
50
+ trustgraph/cli/show_flow_blueprints.py
51
51
  trustgraph/cli/show_flow_state.py
52
52
  trustgraph/cli/show_flows.py
53
53
  trustgraph/cli/show_graph.py
@@ -2,14 +2,14 @@
2
2
  tg-add-library-document = trustgraph.cli.add_library_document:main
3
3
  tg-delete-collection = trustgraph.cli.delete_collection:main
4
4
  tg-delete-config-item = trustgraph.cli.delete_config_item:main
5
- tg-delete-flow-class = trustgraph.cli.delete_flow_class:main
5
+ tg-delete-flow-blueprint = trustgraph.cli.delete_flow_blueprint:main
6
6
  tg-delete-kg-core = trustgraph.cli.delete_kg_core:main
7
7
  tg-delete-mcp-tool = trustgraph.cli.delete_mcp_tool:main
8
8
  tg-delete-tool = trustgraph.cli.delete_tool:main
9
9
  tg-dump-msgpack = trustgraph.cli.dump_msgpack:main
10
10
  tg-dump-queues = trustgraph.cli.dump_queues:main
11
11
  tg-get-config-item = trustgraph.cli.get_config_item:main
12
- tg-get-flow-class = trustgraph.cli.get_flow_class:main
12
+ tg-get-flow-blueprint = trustgraph.cli.get_flow_blueprint:main
13
13
  tg-get-kg-core = trustgraph.cli.get_kg_core:main
14
14
  tg-graph-to-turtle = trustgraph.cli.graph_to_turtle:main
15
15
  tg-init-trustgraph = trustgraph.cli.init_trustgraph:main
@@ -33,7 +33,7 @@ tg-load-structured-data = trustgraph.cli.load_structured_data:main
33
33
  tg-load-text = trustgraph.cli.load_text:main
34
34
  tg-load-turtle = trustgraph.cli.load_turtle:main
35
35
  tg-put-config-item = trustgraph.cli.put_config_item:main
36
- tg-put-flow-class = trustgraph.cli.put_flow_class:main
36
+ tg-put-flow-blueprint = trustgraph.cli.put_flow_blueprint:main
37
37
  tg-put-kg-core = trustgraph.cli.put_kg_core:main
38
38
  tg-remove-library-document = trustgraph.cli.remove_library_document:main
39
39
  tg-save-doc-embeds = trustgraph.cli.save_doc_embeds:main
@@ -43,7 +43,7 @@ tg-set-prompt = trustgraph.cli.set_prompt:main
43
43
  tg-set-token-costs = trustgraph.cli.set_token_costs:main
44
44
  tg-set-tool = trustgraph.cli.set_tool:main
45
45
  tg-show-config = trustgraph.cli.show_config:main
46
- tg-show-flow-classes = trustgraph.cli.show_flow_classes:main
46
+ tg-show-flow-blueprints = trustgraph.cli.show_flow_blueprints:main
47
47
  tg-show-flow-state = trustgraph.cli.show_flow_state:main
48
48
  tg-show-flows = trustgraph.cli.show_flows:main
49
49
  tg-show-graph = trustgraph.cli.show_graph:main
@@ -1,4 +1,4 @@
1
- trustgraph-base<1.8,>=1.7
1
+ trustgraph-base<1.9,>=1.8
2
2
  requests
3
3
  pulsar-client
4
4
  aiohttp
@@ -1 +0,0 @@
1
- __version__ = "1.7.2"