Class: OKF::MCP::Server::Context

Inherits:
Struct
  • Object
show all
Defined in:
lib/okf/mcp/server.rb

Overview

Holds what every tool closes over: the bundle allowlist, the engine that answers search/catalog (memory, or okf-sqlite3 when installed), and the always-present memory folder cache behind read_concept, dirs, index, log and graph.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#engineObject

Returns the value of attribute engine

Returns:

  • (Object)

    the current value of engine



104
105
106
# File 'lib/okf/mcp/server.rb', line 104

def engine
  @engine
end

#memoryObject

Returns the value of attribute memory

Returns:

  • (Object)

    the current value of memory



104
105
106
# File 'lib/okf/mcp/server.rb', line 104

def memory
  @memory
end

#registryObject

Returns the value of attribute registry

Returns:

  • (Object)

    the current value of registry



104
105
106
# File 'lib/okf/mcp/server.rb', line 104

def registry
  @registry
end

Instance Method Details

#folder(bundle) ⇒ Object



109
110
111
# File 'lib/okf/mcp/server.rb', line 109

def folder(bundle)
  memory.folder(root!(bundle))
end

#root!(bundle) ⇒ Object



105
106
107
# File 'lib/okf/mcp/server.rb', line 105

def root!(bundle)
  registry.root!(bundle)
end