enrobie.plugins package#

Subpackages#

Module contents#

class enrobie.plugins.AutoJoinPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin maintains joined for configured channels.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[AutoJoinPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: AutoJoinPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

operate() None[source]#

Perform the operation related to Robie service threads.

class enrobie.plugins.AutoJoinPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

channels

list[AutoJoinPluginChannelParams]

Yes

min_length=1

enable

bool

No

False

interval

int

No

5

ge=5, le=300

locate

str | None

No

None

min_length=1

status

StatusPluginIconParams

No

factory

trusted

list[str] | None

No

None

min_length=1

channels: Annotated[list[AutoJoinPluginChannelParams], FieldInfo(annotation=NoneType, required=True, description='Which channels to maintain join', metadata=[MinLen(min_length=1)])]#
interval: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=5, description='Interval when channels are joined', metadata=[Ge(ge=5), Le(le=300)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.AutoNickPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin maintains configured nickname on server.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[AutoNickPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: AutoNickPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

operate() None[source]#

Perform the operation related to Robie service threads.

class enrobie.plugins.AutoNickPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

clients

list[str]

Yes

min_length=1

enable

bool

No

False

interval

int

No

5

ge=5, le=300

locate

str | None

No

None

min_length=1

services

list[AutoNickPluginServiceParams] | None

No

None

status

StatusPluginIconParams

No

factory

trusted

list[str] | None

No

None

min_length=1

clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
interval: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=5, description='Interval when nick is validated', metadata=[Ge(ge=5), Le(le=300)])]#
services: Annotated[list[AutoNickPluginServiceParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='How to identify with services')]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.AinswerPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin allows for interacting with an LLM model.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[AinswerPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: AinswerPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property models: AinswerModels#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property toolset: AinswerToolset#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property question: AinswerQuestion#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property history: AinswerHistory#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property memory: AinswerMemory#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property agent: Agent[AinswerDepends, str]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

ainswer(mitem: RobieMessage, prompt: str, respond: Type[AinswerResponse]) str[source]#

Submit the question to the LLM and return the response.

Parameters:
  • mitem – Item containing information for operation.

  • prompt – Additional prompt insert before question.

  • respond – Model to describe the expected response.

Returns:

Response adhering to provided specifications.

printer(source: dict[str, Any], color: int = 6) None[source]#

Print the contents for the object within Robie instance.

Parameters:
  • source – Content which will be shown after header.

  • color – Override the color used for box character.

class enrobie.plugins.AinswerPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

ainswer

AinswerPluginAinswerParams

Yes

clients

list[str]

Yes

min_length=1

database

str

No

'sqlite:///:memory:'

min_length=1

enable

bool

No

False

histories

int

No

10

ge=1, le=1000

locate

str | None

No

None

min_length=1

logger

str | None

No

None

min_length=1

memories

int

No

10

ge=1, le=1000

plugins

list[str] | None

No

None

min_length=1

prompt

AinswerPluginPromptParams

No

factory

status

StatusPluginIconParams

No

factory

trusted

list[str] | None

No

None

min_length=1

database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=1000)])]#
memories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per person', metadata=[Ge(ge=1), Le(le=1000)])]#
clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
ainswer: Annotated[AinswerPluginAinswerParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the AI platforms')]#
prompt: Annotated[AinswerPluginPromptParams, FieldInfo(annotation=NoneType, required=False, default_factory=AinswerPluginPromptParams, description='Override the agent system prompt')]#
plugins: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of plugins to load tools', metadata=[MinLen(min_length=1)])]#
logger: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Logger for including recents', metadata=[MinLen(min_length=1)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.HomiePlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin allows for connecting to Homie Automate.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[HomiePluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: HomiePluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property persist: HomiePersist#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

Parameters:

thread – Child class instance for Chatting Robie.

ainswer() list[Callable[[...], Any]][source]#

Return the Ainswer tools that are related to the plugin.

Returns:

Ainswer tools that are related to the plugin.

class enrobie.plugins.HomiePluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

clients

list[str]

Yes

min_length=1

command

HomiePluginCommandParams

No

factory

enable

bool

No

False

locate

str | None

No

None

min_length=1

password

str | None

No

None

min_length=1

restful

str

Yes

min_length=1

ssl_capem

str | None

No

None

min_length=1

ssl_verify

bool

No

True

status

StatusPluginIconParams

No

factory

timeout

int

No

30

ge=1, le=300

trusted

list[str] | None

No

None

min_length=1

username

str | None

No

None

min_length=1

command: Annotated[HomiePluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=HomiePluginCommandParams, description='Command name per chat platform')]#
restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.NagiosPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin allows for connecting to Nagios Console.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[NagiosPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: NagiosPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property current: NagiosCurrent#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

Parameters:

thread – Child class instance for Chatting Robie.

ainswer() list[Callable[[...], Any]][source]#

Return the Ainswer tools that are related to the plugin.

Returns:

Ainswer tools that are related to the plugin.

class enrobie.plugins.NagiosPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

clients

list[str]

Yes

min_length=1

command

NagiosPluginCommandParams

No

factory

enable

bool

No

False

locate

str | None

No

None

min_length=1

password

str | None

No

None

min_length=1

restful

str

Yes

min_length=1

ssl_capem

str | None

No

None

min_length=1

ssl_verify

bool

No

True

status

StatusPluginIconParams

No

factory

timeout

int

No

30

ge=1, le=300

trusted

list[str] | None

No

None

min_length=1

username

str | None

No

None

min_length=1

command: Annotated[NagiosPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=NagiosPluginCommandParams, description='Command name per chat platform')]#
restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.LoggerPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin allows for interacting with an LLM model.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[LoggerPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: LoggerPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property history: LoggerHistory#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

class enrobie.plugins.LoggerPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

clients

list[str]

Yes

min_length=1

database

str

No

'sqlite:///:memory:'

min_length=1

enable

bool

No

False

histories

int

No

100

ge=1, le=10000

locate

str | None

No

None

min_length=1

output

str | None

No

None

min_length=4

status

StatusPluginIconParams

No

factory

trusted

list[str] | None

No

None

min_length=1

database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=100, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=10000)])]#
clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
output: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional path where logs append', metadata=[MinLen(min_length=4)])]#
status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
class enrobie.plugins.StatusPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#

Bases: RobiePlugin

Integrate with the Robie routine and perform operations.

Note

This plugin responds to inquiries about Robie status.

validate() None[source]#

Perform advanced validation on the parameters provided.

classmethod schema() Type[StatusPluginParams][source]#

Return the configuration parameters relevant for class.

Returns:

Configuration parameters relevant for class.

property params: StatusPluginParams#

Return the Pydantic model containing the configuration.

Returns:

Pydantic model containing the configuration.

property status: StatusPluginItems#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Robie service threads.

report() None[source]#

Perform the operation related to Robie service threads.

update(unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown']) None[source]#

Update or insert the status of the Robie child instance.

Parameters:
  • unique – Unique identifier to use for the status.

  • group – Name for the group the status is membered.

  • title – Friendly name of the related unique entry.

  • icon – Optional icon object if supported platform.

  • state – One of several possible value for status.

class enrobie.plugins.StatusPluginParams[source]#

Bases: RobiePluginParams

Process and validate the Robie configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

command

StatusPluginCommandParams

No

factory

enable

bool

No

False

icons

StatusPluginIconsParams

No

factory

locate

str | None

No

None

min_length=1

reports

list[StatusPluginReportParams] | None

No

None

min_length=1

trusted

list[str] | None

No

None

min_length=1

reports: Annotated[list[StatusPluginReportParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Where to send status updates', metadata=[MinLen(min_length=1)])]#
command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')]#
icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')]#
class enrobie.plugins.StatusPluginIconParams[source]#

Bases: RobieParamsModel

Contain information for constructing the chat messages.

Fields#

Field

Type

Required

Default

Constraints

dsc

str | None

No

None

min_length=1

irc

str | None

No

None

min_length=1

mtm

str | None

No

None

min_length=1

irc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
mtm: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])]#
class enrobie.plugins.StatusPluginItem(time: Time, unique: str, group: str, title: str, icon: StatusPluginIconParams, state: Literal['pending', 'normal', 'failure', 'unknown'])[source]#

Bases: object

Contain the relevant status information for the entry.

time: Time#
unique: str#
group: str#
title: str#
icon: StatusPluginIconParams#
state: Literal['pending', 'normal', 'failure', 'unknown']#