trustgraph-flow 1.3.2__tar.gz → 1.3.3__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_flow-1.3.2 → trustgraph_flow-1.3.3}/PKG-INFO +2 -1
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/pyproject.toml +2 -1
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/service.py +28 -3
- trustgraph_flow-1.3.3/trustgraph/agent/tool_filter.py +165 -0
- trustgraph_flow-1.3.3/trustgraph/flow_version.py +1 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/manager.py +2 -0
- trustgraph_flow-1.3.3/trustgraph/gateway/dispatch/objects_query.py +30 -0
- trustgraph_flow-1.3.3/trustgraph/query/objects/cassandra/__init__.py +2 -0
- trustgraph_flow-1.3.3/trustgraph/query/objects/cassandra/__main__.py +6 -0
- trustgraph_flow-1.3.3/trustgraph/query/objects/cassandra/service.py +743 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/cassandra/service.py +18 -27
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/knowledge/store.py +13 -9
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/objects/cassandra/write.py +20 -25
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/rows/cassandra/write.py +24 -31
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/cassandra/write.py +18 -27
- trustgraph_flow-1.3.3/trustgraph/tables/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/tables/config.py +4 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/tables/knowledge.py +4 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/tables/library.py +4 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/PKG-INFO +2 -1
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/SOURCES.txt +6 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/entry_points.txt +1 -1
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/requires.txt +1 -0
- trustgraph_flow-1.3.2/trustgraph/flow_version.py +0 -1
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/README.md +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/setup.cfg +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/mcp_tool/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/mcp_tool/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/mcp_tool/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/agent_manager.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/tools.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/agent/react/types.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/recursive/chunker.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/chunking/token/chunker.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/config/service/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/config/service/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/config/service/config.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/config/service/flow.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/config/service/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/cores/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/cores/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/cores/knowledge.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/cores/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/direct/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/fastembed/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/fastembed/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/fastembed/processor.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/external/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/external/wikipedia/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/external/wikipedia/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/external/wikipedia/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/agent/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/agent/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/agent/extract.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/definitions/extract.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/objects/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/objects/processor.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/relationships/extract.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/extract/kg/topics/extract.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/auth.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/config/receiver.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/agent.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/config.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/core_export.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/core_import.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/document_load.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/document_rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/embeddings.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/flow.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/knowledge.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/librarian.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/mux.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/prompt.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/requestor.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/sender.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/serialize.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/streamer.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/text_completion.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/text_load.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/triples_export.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/triples_import.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/dispatch/triples_query.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/manager.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/metrics.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/socket.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/running.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/unused/dbpedia.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/unused/encyclopedia.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/gateway/unused/internet_search.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/librarian/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/librarian/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/librarian/blob_store.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/librarian/librarian.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/librarian/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/metering/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/metering/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/metering/counter.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/claude/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/cohere/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/googleaistudio/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/mistral/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/ollama/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/openai/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/tgi/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/model/text_completion/vllm/llm.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/processing/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/processing/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/processing/processing.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/prompt/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/prompt/template/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/prompt/template/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/prompt/template/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/query/triples → trustgraph_flow-1.3.3/trustgraph/query/objects}/__init__.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/retrieval → trustgraph_flow-1.3.3/trustgraph/query/triples}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/falkordb/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/memgraph/service.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage → trustgraph_flow-1.3.3/trustgraph/retrieval}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/document_rag/document_rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/rev_gateway/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/rev_gateway/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/rev_gateway/dispatcher.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/rev_gateway/service.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage/doc_embeddings → trustgraph_flow-1.3.3/trustgraph/storage}/__init__.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage/graph_embeddings → trustgraph_flow-1.3.3/trustgraph/storage/doc_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage/object_embeddings → trustgraph_flow-1.3.3/trustgraph/storage/graph_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/knowledge/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/knowledge/__main__.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage/rows → trustgraph_flow-1.3.3/trustgraph/storage/object_embeddings}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/objects/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/objects/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/objects/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/storage/triples → trustgraph_flow-1.3.3/trustgraph/storage/rows}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.2/trustgraph/tables → trustgraph_flow-1.3.3/trustgraph/storage/triples}/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/falkordb/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/memgraph/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/storage/triples/neo4j/write.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/template/__init__.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph/template/prompt_manager.py +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph_flow-1.3.2 → trustgraph_flow-1.3.3}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.3
|
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
|
@@ -38,6 +38,7 @@ Requires-Dist: pyyaml
|
|
38
38
|
Requires-Dist: qdrant-client
|
39
39
|
Requires-Dist: rdflib
|
40
40
|
Requires-Dist: requests
|
41
|
+
Requires-Dist: strawberry-graphql
|
41
42
|
Requires-Dist: tabulate
|
42
43
|
Requires-Dist: tiktoken
|
43
44
|
Requires-Dist: urllib3
|
@@ -40,6 +40,7 @@ dependencies = [
|
|
40
40
|
"qdrant-client",
|
41
41
|
"rdflib",
|
42
42
|
"requests",
|
43
|
+
"strawberry-graphql",
|
43
44
|
"tabulate",
|
44
45
|
"tiktoken",
|
45
46
|
"urllib3",
|
@@ -87,12 +88,12 @@ librarian = "trustgraph.librarian:run"
|
|
87
88
|
mcp-tool = "trustgraph.agent.mcp_tool:run"
|
88
89
|
metering = "trustgraph.metering:run"
|
89
90
|
objects-write-cassandra = "trustgraph.storage.objects.cassandra:run"
|
91
|
+
objects-query-cassandra = "trustgraph.query.objects.cassandra:run"
|
90
92
|
oe-write-milvus = "trustgraph.storage.object_embeddings.milvus:run"
|
91
93
|
pdf-decoder = "trustgraph.decoding.pdf:run"
|
92
94
|
pdf-ocr-mistral = "trustgraph.decoding.mistral_ocr:run"
|
93
95
|
prompt-template = "trustgraph.prompt.template:run"
|
94
96
|
rev-gateway = "trustgraph.rev_gateway:run"
|
95
|
-
rows-write-cassandra = "trustgraph.storage.rows.cassandra:run"
|
96
97
|
run-processing = "trustgraph.processing:run"
|
97
98
|
text-completion-azure = "trustgraph.model.text_completion.azure:run"
|
98
99
|
text-completion-azure-openai = "trustgraph.model.text_completion.azure_openai:run"
|
@@ -18,6 +18,7 @@ from ... schema import AgentRequest, AgentResponse, AgentStep, Error
|
|
18
18
|
|
19
19
|
from . tools import KnowledgeQueryImpl, TextCompletionImpl, McpToolImpl, PromptImpl
|
20
20
|
from . agent_manager import AgentManager
|
21
|
+
from ..tool_filter import validate_tool_config, filter_tools_by_group_and_state, get_next_state
|
21
22
|
|
22
23
|
from . types import Final, Action, Tool, Argument
|
23
24
|
|
@@ -142,6 +143,9 @@ class Processor(AgentService):
|
|
142
143
|
f"Tool type {impl_id} not known"
|
143
144
|
)
|
144
145
|
|
146
|
+
# Validate tool configuration
|
147
|
+
validate_tool_config(data)
|
148
|
+
|
145
149
|
tools[name] = Tool(
|
146
150
|
name=name,
|
147
151
|
description=data.get("description"),
|
@@ -219,9 +223,24 @@ class Processor(AgentService):
|
|
219
223
|
|
220
224
|
await respond(r)
|
221
225
|
|
226
|
+
# Apply tool filtering based on request groups and state
|
227
|
+
filtered_tools = filter_tools_by_group_and_state(
|
228
|
+
tools=self.agent.tools,
|
229
|
+
requested_groups=getattr(request, 'group', None),
|
230
|
+
current_state=getattr(request, 'state', None)
|
231
|
+
)
|
232
|
+
|
233
|
+
logger.info(f"Filtered from {len(self.agent.tools)} to {len(filtered_tools)} available tools")
|
234
|
+
|
235
|
+
# Create temporary agent with filtered tools
|
236
|
+
temp_agent = AgentManager(
|
237
|
+
tools=filtered_tools,
|
238
|
+
additional_context=self.agent.additional_context
|
239
|
+
)
|
240
|
+
|
222
241
|
logger.debug("Call React")
|
223
242
|
|
224
|
-
act = await
|
243
|
+
act = await temp_agent.react(
|
225
244
|
question = request.question,
|
226
245
|
history = history,
|
227
246
|
think = think,
|
@@ -255,11 +274,17 @@ class Processor(AgentService):
|
|
255
274
|
logger.debug("Send next...")
|
256
275
|
|
257
276
|
history.append(act)
|
277
|
+
|
278
|
+
# Handle state transitions if tool execution was successful
|
279
|
+
next_state = request.state
|
280
|
+
if act.name in filtered_tools:
|
281
|
+
executed_tool = filtered_tools[act.name]
|
282
|
+
next_state = get_next_state(executed_tool, request.state or "undefined")
|
258
283
|
|
259
284
|
r = AgentRequest(
|
260
285
|
question=request.question,
|
261
|
-
|
262
|
-
|
286
|
+
state=next_state,
|
287
|
+
group=getattr(request, 'group', []),
|
263
288
|
history=[
|
264
289
|
AgentStep(
|
265
290
|
thought=h.thought,
|
@@ -0,0 +1,165 @@
|
|
1
|
+
"""
|
2
|
+
Tool filtering logic for the TrustGraph tool group system.
|
3
|
+
|
4
|
+
Provides functions to filter available tools based on group membership
|
5
|
+
and execution state as defined in the tool-group tech spec.
|
6
|
+
"""
|
7
|
+
|
8
|
+
import logging
|
9
|
+
from typing import Dict, List, Optional, Any
|
10
|
+
|
11
|
+
logger = logging.getLogger(__name__)
|
12
|
+
|
13
|
+
|
14
|
+
def filter_tools_by_group_and_state(
|
15
|
+
tools: Dict[str, Any],
|
16
|
+
requested_groups: Optional[List[str]] = None,
|
17
|
+
current_state: Optional[str] = None
|
18
|
+
) -> Dict[str, Any]:
|
19
|
+
"""
|
20
|
+
Filter tools based on group membership and execution state.
|
21
|
+
|
22
|
+
Args:
|
23
|
+
tools: Dictionary of tool_name -> tool_object
|
24
|
+
requested_groups: List of groups requested (defaults to ["default"])
|
25
|
+
current_state: Current execution state (defaults to "undefined")
|
26
|
+
|
27
|
+
Returns:
|
28
|
+
Dictionary of filtered tools that match group and state criteria
|
29
|
+
"""
|
30
|
+
|
31
|
+
# Apply defaults as specified in tech spec
|
32
|
+
if requested_groups is None:
|
33
|
+
requested_groups = ["default"]
|
34
|
+
if current_state is None:
|
35
|
+
current_state = "undefined"
|
36
|
+
|
37
|
+
logger.info(f"Filtering tools with groups={requested_groups}, state={current_state}")
|
38
|
+
|
39
|
+
filtered_tools = {}
|
40
|
+
|
41
|
+
for tool_name, tool in tools.items():
|
42
|
+
if _is_tool_available(tool, requested_groups, current_state):
|
43
|
+
filtered_tools[tool_name] = tool
|
44
|
+
else:
|
45
|
+
logger.debug(f"Tool {tool_name} filtered out")
|
46
|
+
|
47
|
+
logger.info(f"Filtered {len(tools)} tools to {len(filtered_tools)} available tools")
|
48
|
+
return filtered_tools
|
49
|
+
|
50
|
+
|
51
|
+
def _is_tool_available(
|
52
|
+
tool: Any,
|
53
|
+
requested_groups: List[str],
|
54
|
+
current_state: str
|
55
|
+
) -> bool:
|
56
|
+
"""
|
57
|
+
Check if a tool is available based on group and state criteria.
|
58
|
+
|
59
|
+
Args:
|
60
|
+
tool: Tool object with config attribute containing group/state metadata
|
61
|
+
requested_groups: List of requested groups
|
62
|
+
current_state: Current execution state
|
63
|
+
|
64
|
+
Returns:
|
65
|
+
True if tool should be available, False otherwise
|
66
|
+
"""
|
67
|
+
|
68
|
+
# Extract tool configuration
|
69
|
+
config = getattr(tool, 'config', {})
|
70
|
+
|
71
|
+
# Get tool groups (default to ["default"] if not specified)
|
72
|
+
tool_groups = config.get('group', ["default"])
|
73
|
+
if not isinstance(tool_groups, list):
|
74
|
+
tool_groups = [tool_groups]
|
75
|
+
|
76
|
+
# Get tool applicable states (default to all states if not specified)
|
77
|
+
applicable_states = config.get('applicable-states', ["*"])
|
78
|
+
if not isinstance(applicable_states, list):
|
79
|
+
applicable_states = [applicable_states]
|
80
|
+
|
81
|
+
# Apply group filtering logic from tech spec:
|
82
|
+
# Tool is available if intersection(tool_groups, requested_groups) is not empty
|
83
|
+
# OR "*" is in requested_groups (wildcard access)
|
84
|
+
group_match = (
|
85
|
+
"*" in requested_groups or
|
86
|
+
bool(set(tool_groups) & set(requested_groups))
|
87
|
+
)
|
88
|
+
|
89
|
+
# Apply state filtering logic from tech spec:
|
90
|
+
# Tool is available if current_state is in applicable_states
|
91
|
+
# OR "*" is in applicable_states (available in all states)
|
92
|
+
state_match = (
|
93
|
+
"*" in applicable_states or
|
94
|
+
current_state in applicable_states
|
95
|
+
)
|
96
|
+
|
97
|
+
is_available = group_match and state_match
|
98
|
+
|
99
|
+
if logger.isEnabledFor(logging.DEBUG):
|
100
|
+
logger.debug(
|
101
|
+
f"Tool availability check: tool_groups={tool_groups}, "
|
102
|
+
f"requested_groups={requested_groups}, applicable_states={applicable_states}, "
|
103
|
+
f"current_state={current_state}, group_match={group_match}, "
|
104
|
+
f"state_match={state_match}, is_available={is_available}"
|
105
|
+
)
|
106
|
+
|
107
|
+
return is_available
|
108
|
+
|
109
|
+
|
110
|
+
def get_next_state(tool: Any, current_state: str) -> str:
|
111
|
+
"""
|
112
|
+
Get the next state after successful tool execution.
|
113
|
+
|
114
|
+
Args:
|
115
|
+
tool: Tool object with config attribute
|
116
|
+
current_state: Current execution state
|
117
|
+
|
118
|
+
Returns:
|
119
|
+
Next state, or current_state if no transition is defined
|
120
|
+
"""
|
121
|
+
config = getattr(tool, 'config', {})
|
122
|
+
if config is None:
|
123
|
+
config = {}
|
124
|
+
next_state = config.get('state')
|
125
|
+
|
126
|
+
if next_state:
|
127
|
+
logger.debug(f"State transition: {current_state} -> {next_state}")
|
128
|
+
return next_state
|
129
|
+
else:
|
130
|
+
logger.debug(f"No state transition defined, staying in {current_state}")
|
131
|
+
return current_state
|
132
|
+
|
133
|
+
|
134
|
+
def validate_tool_config(config: Dict[str, Any]) -> None:
|
135
|
+
"""
|
136
|
+
Validate tool configuration for group and state fields.
|
137
|
+
|
138
|
+
Args:
|
139
|
+
config: Tool configuration dictionary
|
140
|
+
|
141
|
+
Raises:
|
142
|
+
ValueError: If configuration is invalid
|
143
|
+
"""
|
144
|
+
|
145
|
+
# Validate group field
|
146
|
+
if 'group' in config:
|
147
|
+
groups = config['group']
|
148
|
+
if not isinstance(groups, list):
|
149
|
+
raise ValueError("Tool 'group' field must be a list of strings")
|
150
|
+
if not all(isinstance(g, str) for g in groups):
|
151
|
+
raise ValueError("All group names must be strings")
|
152
|
+
|
153
|
+
# Validate state field
|
154
|
+
if 'state' in config:
|
155
|
+
state = config['state']
|
156
|
+
if not isinstance(state, str):
|
157
|
+
raise ValueError("Tool 'state' field must be a string")
|
158
|
+
|
159
|
+
# Validate applicable-states field
|
160
|
+
if 'applicable-states' in config:
|
161
|
+
states = config['applicable-states']
|
162
|
+
if not isinstance(states, list):
|
163
|
+
raise ValueError("Tool 'applicable-states' field must be a list of strings")
|
164
|
+
if not all(isinstance(s, str) for s in states):
|
165
|
+
raise ValueError("All state names must be strings")
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "1.3.3"
|
@@ -19,6 +19,7 @@ from . prompt import PromptRequestor
|
|
19
19
|
from . graph_rag import GraphRagRequestor
|
20
20
|
from . document_rag import DocumentRagRequestor
|
21
21
|
from . triples_query import TriplesQueryRequestor
|
22
|
+
from . objects_query import ObjectsQueryRequestor
|
22
23
|
from . embeddings import EmbeddingsRequestor
|
23
24
|
from . graph_embeddings_query import GraphEmbeddingsQueryRequestor
|
24
25
|
from . mcp_tool import McpToolRequestor
|
@@ -50,6 +51,7 @@ request_response_dispatchers = {
|
|
50
51
|
"embeddings": EmbeddingsRequestor,
|
51
52
|
"graph-embeddings": GraphEmbeddingsQueryRequestor,
|
52
53
|
"triples": TriplesQueryRequestor,
|
54
|
+
"objects": ObjectsQueryRequestor,
|
53
55
|
}
|
54
56
|
|
55
57
|
global_dispatchers = {
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from ... schema import ObjectsQueryRequest, ObjectsQueryResponse
|
2
|
+
from ... messaging import TranslatorRegistry
|
3
|
+
|
4
|
+
from . requestor import ServiceRequestor
|
5
|
+
|
6
|
+
class ObjectsQueryRequestor(ServiceRequestor):
|
7
|
+
def __init__(
|
8
|
+
self, pulsar_client, request_queue, response_queue, timeout,
|
9
|
+
consumer, subscriber,
|
10
|
+
):
|
11
|
+
|
12
|
+
super(ObjectsQueryRequestor, self).__init__(
|
13
|
+
pulsar_client=pulsar_client,
|
14
|
+
request_queue=request_queue,
|
15
|
+
response_queue=response_queue,
|
16
|
+
request_schema=ObjectsQueryRequest,
|
17
|
+
response_schema=ObjectsQueryResponse,
|
18
|
+
subscription = subscriber,
|
19
|
+
consumer_name = consumer,
|
20
|
+
timeout=timeout,
|
21
|
+
)
|
22
|
+
|
23
|
+
self.request_translator = TranslatorRegistry.get_request_translator("objects-query")
|
24
|
+
self.response_translator = TranslatorRegistry.get_response_translator("objects-query")
|
25
|
+
|
26
|
+
def to_request(self, body):
|
27
|
+
return self.request_translator.to_pulsar(body)
|
28
|
+
|
29
|
+
def from_response(self, message):
|
30
|
+
return self.response_translator.from_response_with_completion(message)
|