mindroot.coreplugins.index package - MindRoot 9.10.0 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# mindroot.coreplugins.index package

## Subpackages

- mindroot.coreplugins.index.handlers package
  - Submodules
  - mindroot.coreplugins.index.handlers.agent_ops module
    - `add_agent()`
    - `remove_agent()`
  - mindroot.coreplugins.index.handlers.index_ops module
    - `create_index()`
    - `list_indices()`
    - `update_index()`
  - mindroot.coreplugins.index.handlers.plugin_ops module
    - `add_plugin()`
    - `create_distributable_entry()`
    - `get_installed_plugin_metadata()`
    - `remove_plugin()`
  - mindroot.coreplugins.index.handlers.publish module
    - `install_index_from_zip()`
    - `publish_index()`
  - Module contents
    - `add_agent()`
    - `add_plugin()`
    - `create_index()`
    - `install_index_from_zip()`
    - `list_indices()`
    - `publish_index()`
    - `remove_agent()`
    - `remove_plugin()`
    - `update_index()`

## Submodules

## mindroot.coreplugins.index.mod module

async mindroot.coreplugins.index.mod.startup(app, context)

## mindroot.coreplugins.index.models module

class mindroot.coreplugins.index.models.AgentEntry(*, name: str, version: str, description: str | None = None, required_commands: List[str] = [], required_services: List[str] = [])

  Bases: `BaseModel`

  description: str | None
  model_config: ClassVar[ConfigDict] = {}

    Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

  name: str
  required_commands: List[str]
  required_services: List[str]
  version: str

class mindroot.coreplugins.index.models.IndexMetadata(*, name: str, description: str | None = '', version: str = '1.0.0', url: str | None = None, trusted: bool = False)

  Bases: `BaseModel`

  description: str | None
  model_config: ClassVar[ConfigDict] = {}

    Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

  name: str
  trusted: bool
  url: str | None
  version: str

class mindroot.coreplugins.index.models.PluginEntry(*, name: str, version: str, description: str | None = None, source: str, source_path: str | None = None, github_url: str | None = None, remote_source: str | None = None, commands: List[str] | None = [], services: List[str] = [], dependencies: List[str] = [])

  Bases: `BaseModel`

  Model for plugin entries in index

  commands: List[str] | None
  dependencies: List[str]
  description: str | None
  github_url: str | None
  model_config: ClassVar[ConfigDict] = {}

    Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

  name: str
  remote_source: str | None
  services: List[str]
  source: str
  source_path: str | None
  version: str

class mindroot.coreplugins.index.models.PluginManifest(*, name: str, version: str, description: str | None = None, commands: List[str], services: List[str] = [], dependencies: List[str] = [])

  Bases: `BaseModel`

  Model for reading plugin manifest files

  commands: List[str]
  dependencies: List[str]
  description: str | None
  model_config: ClassVar[ConfigDict] = {}

    Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

  name: str
  services: List[str]
  version: str

## mindroot.coreplugins.index.router module

async mindroot.coreplugins.index.router.add_agent_route(index_name: str, agent: AgentEntry)

async mindroot.coreplugins.index.router.add_plugin_route(index_name: str, plugin: PluginEntry)

async mindroot.coreplugins.index.router.create_index_route(metadata: IndexMetadata)

async mindroot.coreplugins.index.router.install_index_route(file: UploadFile = File(PydanticUndefined))

async mindroot.coreplugins.index.router.list_indices_route()

async mindroot.coreplugins.index.router.publish_index_route(index_name: str)

async mindroot.coreplugins.index.router.remove_agent_route(index_name: str, agent_name: str)

async mindroot.coreplugins.index.router.remove_plugin_route(index_name: str, plugin_name: str)

async mindroot.coreplugins.index.router.update_index_route(index_name: str, metadata: IndexMetadata)

## mindroot.coreplugins.index.utils module

mindroot.coreplugins.index.utils.ensure_index_structure(index_dir: Path) → None

  Ensure index directory has the required structure

mindroot.coreplugins.index.utils.install_persona(source_dir: Path, persona_name: str) → None

  Install a persona directory to the correct location

async mindroot.coreplugins.index.utils.load_agent_data(agent_name: str) → dict

  Load agent data from local or shared directory

async mindroot.coreplugins.index.utils.load_persona_data(persona_name: str) → dict

  Load persona data from local or shared directory

## Module contents