Class KnowledgeToolsGraphStoreProvider

java.lang.Object
com.tnsai.intelligence.rag.graph.KnowledgeToolsGraphStoreProvider
All Implemented Interfaces:
GraphStoreProvider

public final class KnowledgeToolsGraphStoreProvider extends Object implements GraphStoreProvider
Built-in graph adapter for live KnowledgeTools triples.

Claims a Role when tnsai-tools is on the classpath and the requested source fence is empty or contains SOURCE. Missing tools leave the Role unclaimed, so @Search(strategy = GRAPH) without this artifact still fails as a configuration error rather than succeeding against an empty in-process bag. A consumer-supplied provider that also claims the Role wins: this adapter is a framework default.

Since:
0.14.0
  • Field Details

  • Constructor Details

    • KnowledgeToolsGraphStoreProvider

      public KnowledgeToolsGraphStoreProvider()
  • Method Details

    • name

      public String name()
      Description copied from interface: GraphStoreProvider
      Stable provider name used in retrieval provenance.
      Specified by:
      name in interface GraphStoreProvider
      Returns:
      non-blank provider name
    • frameworkDefault

      public boolean frameworkDefault()
      Description copied from interface: GraphStoreProvider
      Framework-bundled fallback adapter.

      When a non-default provider also claims the Role, the registry drops every default so an explicit consumer adapter wins. Defaults still serve a Role that no other provider claims.

      Specified by:
      frameworkDefault in interface GraphStoreProvider
      Returns:
      true for the bundled KnowledgeTools adapter
    • open

      Description copied from interface: GraphStoreProvider
      Opens a graph store for the requested Role and source fence.

      Return Optional.empty() when this provider is not configured for the Role. Providers should not widen the requested source set.

      Specified by:
      open in interface GraphStoreProvider
      Parameters:
      request - Role and source selection
      Returns:
      a configured store, or empty when unsupported