enrobie.plugins package#
Subpackages#
- enrobie.plugins.ainswer package
- Subpackages
- Submodules
- enrobie.plugins.ainswer.ainswer module
- enrobie.plugins.ainswer.common module
- enrobie.plugins.ainswer.helpers module
- enrobie.plugins.ainswer.history module
- enrobie.plugins.ainswer.memory module
- enrobie.plugins.ainswer.models module
- enrobie.plugins.ainswer.params module
AinswerPluginAinswerParams
AinswerPluginParams
AinswerPluginParams.ainswer
AinswerPluginParams.clients
AinswerPluginParams.database
AinswerPluginParams.enable
AinswerPluginParams.histories
AinswerPluginParams.locate
AinswerPluginParams.logger
AinswerPluginParams.memories
AinswerPluginParams.plugins
AinswerPluginParams.prompt
AinswerPluginParams.status
AinswerPluginParams.trusted
AinswerPluginPromptClientParams
AinswerPluginPromptParams
- enrobie.plugins.ainswer.plugin module
- enrobie.plugins.ainswer.question module
- enrobie.plugins.ainswer.toolset module
- Module contents
AinswerDepends
AinswerPlugin
AinswerPluginParams
AinswerPluginParams.ainswer
AinswerPluginParams.clients
AinswerPluginParams.database
AinswerPluginParams.enable
AinswerPluginParams.histories
AinswerPluginParams.locate
AinswerPluginParams.logger
AinswerPluginParams.memories
AinswerPluginParams.plugins
AinswerPluginParams.prompt
AinswerPluginParams.status
AinswerPluginParams.trusted
- enrobie.plugins.autojoin package
- enrobie.plugins.autonick package
- enrobie.plugins.enhomie package
- Subpackages
- Submodules
- enrobie.plugins.enhomie.ainswer module
- enrobie.plugins.enhomie.helpers module
- enrobie.plugins.enhomie.params module
HomiePluginCommandParams
HomiePluginParams
HomiePluginParams.clients
HomiePluginParams.command
HomiePluginParams.enable
HomiePluginParams.locate
HomiePluginParams.password
HomiePluginParams.restful
HomiePluginParams.ssl_capem
HomiePluginParams.ssl_verify
HomiePluginParams.status
HomiePluginParams.timeout
HomiePluginParams.trusted
HomiePluginParams.username
- enrobie.plugins.enhomie.persist module
- enrobie.plugins.enhomie.plugin module
- Module contents
HomiePlugin
HomiePluginParams
HomiePluginParams.clients
HomiePluginParams.command
HomiePluginParams.enable
HomiePluginParams.locate
HomiePluginParams.password
HomiePluginParams.restful
HomiePluginParams.ssl_capem
HomiePluginParams.ssl_verify
HomiePluginParams.status
HomiePluginParams.timeout
HomiePluginParams.trusted
HomiePluginParams.username
- enrobie.plugins.logger package
- enrobie.plugins.nagios package
- Subpackages
- Submodules
- enrobie.plugins.nagios.ainswer module
- enrobie.plugins.nagios.current module
- enrobie.plugins.nagios.helpers module
- enrobie.plugins.nagios.params module
NagiosPluginCommandParams
NagiosPluginParams
NagiosPluginParams.clients
NagiosPluginParams.command
NagiosPluginParams.enable
NagiosPluginParams.locate
NagiosPluginParams.password
NagiosPluginParams.restful
NagiosPluginParams.ssl_capem
NagiosPluginParams.ssl_verify
NagiosPluginParams.status
NagiosPluginParams.timeout
NagiosPluginParams.trusted
NagiosPluginParams.username
- enrobie.plugins.nagios.plugin module
- Module contents
NagiosPlugin
NagiosPluginParams
NagiosPluginParams.clients
NagiosPluginParams.command
NagiosPluginParams.enable
NagiosPluginParams.locate
NagiosPluginParams.password
NagiosPluginParams.restful
NagiosPluginParams.ssl_capem
NagiosPluginParams.ssl_verify
NagiosPluginParams.status
NagiosPluginParams.timeout
NagiosPluginParams.trusted
NagiosPluginParams.username
- enrobie.plugins.status package
- Subpackages
- Submodules
- enrobie.plugins.status.common module
- enrobie.plugins.status.helpers module
- enrobie.plugins.status.params module
- enrobie.plugins.status.plugin module
- Module contents
Module contents#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- 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.
- property agent: Agent[AinswerDepends, str]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- 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.
- 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 models: AinswerModels#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: AinswerPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- 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.
- property question: AinswerQuestion#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- classmethod schema() Type[AinswerPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property toolset: AinswerToolset#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- pydantic model enrobie.plugins.AinswerPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "AinswerPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "database": { "default": "sqlite:///:memory:", "description": "Database connection string", "minLength": 1, "title": "Database", "type": "string" }, "histories": { "default": 10, "description": "Number of messages per anchor", "maximum": 1000, "minimum": 1, "title": "Histories", "type": "integer" }, "memories": { "default": 10, "description": "Number of messages per person", "maximum": 1000, "minimum": 1, "title": "Memories", "type": "integer" }, "clients": { "description": "List of clients to enable plugin", "items": { "type": "string" }, "minItems": 1, "title": "Clients", "type": "array" }, "ainswer": { "$ref": "#/$defs/AinswerPluginAinswerParams", "description": "Parameters for the AI platforms" }, "prompt": { "$ref": "#/$defs/AinswerPluginPromptParams", "description": "Override the agent system prompt" }, "plugins": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of plugins to load tools", "title": "Plugins" }, "logger": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Logger for including recents", "title": "Logger" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "AinswerPluginAinswerParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "origin": { "description": "Which platform hosts the model", "enum": [ "anthropic", "openai" ], "title": "Origin", "type": "string" }, "model": { "description": "Platform model that will be used", "minLength": 1, "title": "Model", "type": "string" }, "secret": { "description": "Model in platform that is used", "minLength": 1, "title": "Secret", "type": "string" }, "timeout": { "default": 30, "description": "Time to wait during the request", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "sleep": { "default": [ 15, 30 ], "description": "Time to wait before the request", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "integer" }, { "type": "integer" } ], "title": "Sleep", "type": "array" } }, "required": [ "origin", "model", "secret" ], "title": "AinswerPluginAinswerParams", "type": "object" }, "AinswerPluginPromptClientParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "dsc": { "default": "In 1875 characters or less, answer the user question. Format for Discord. Markdown is encouraged.", "description": "Supplement the system prompt", "minLength": 1, "title": "Dsc", "type": "string" }, "irc": { "default": "In 325 characters or less, answer the user question. Format for IRCv2. Do not use markdown. Do not use colors.", "description": "Supplement the system prompt", "minLength": 1, "title": "Irc", "type": "string" }, "mtm": { "default": "In 1875 characters or less, answer the user question. Format for Mattermost. Markdown is encouraged.", "description": "Supplement the system prompt", "minLength": 1, "title": "Mtm", "type": "string" } }, "title": "AinswerPluginPromptClientParams", "type": "object" }, "AinswerPluginPromptParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "system": { "default": "You are a helpful chatbot assistant named Robie. You were built by Robert, at the Enasis Network.", "description": "Override the agent system prompt", "minLength": 1, "title": "System", "type": "string" }, "client": { "$ref": "#/$defs/AinswerPluginPromptClientParams", "description": "Additional chat platform prompt" }, "header": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional header before question", "title": "Header" }, "footer": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional footer after question", "title": "Footer" }, "ignore": { "default": [ "If you believe that you are being abused by the user asking the quesiton." ], "description": "Reasons for LLM to decline response", "items": { "type": "string" }, "minItems": 1, "title": "Ignore", "type": "array" } }, "title": "AinswerPluginPromptParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "clients", "ainswer" ] }
- Config:
extra: str = forbid
- Fields:
- field ainswer: Annotated[AinswerPluginAinswerParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the AI platforms')] [Required]#
Parameters for the AI platforms
- field clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])] [Required]#
List of clients to enable plugin
- Constraints:
min_length = 1
- field database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])] = 'sqlite:///:memory:'#
Database connection string
- Constraints:
min_length = 1
- field histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=1000)])] = 10#
Number of messages per anchor
- Constraints:
ge = 1
le = 1000
- field logger: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Logger for including recents', metadata=[MinLen(min_length=1)])] = None#
Logger for including recents
- Constraints:
min_length = 1
- field memories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per person', metadata=[Ge(ge=1), Le(le=1000)])] = 10#
Number of messages per person
- Constraints:
ge = 1
le = 1000
- field plugins: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of plugins to load tools', metadata=[MinLen(min_length=1)])] = None#
List of plugins to load tools
- Constraints:
min_length = 1
- field prompt: Annotated[AinswerPluginPromptParams, FieldInfo(annotation=NoneType, required=False, default_factory=AinswerPluginPromptParams, description='Override the agent system prompt')] [Optional]#
Override the agent system prompt
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
Icon used per chat platform
- 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.
- property params: AutoJoinPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[AutoJoinPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- pydantic model enrobie.plugins.AutoJoinPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "AutoJoinPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "channels": { "description": "Which channels to maintain join", "items": { "$ref": "#/$defs/AutoJoinPluginChannelParams" }, "minItems": 1, "title": "Channels", "type": "array" }, "interval": { "default": 5, "description": "Interval when channels are joined", "maximum": 300, "minimum": 5, "title": "Interval", "type": "integer" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "AutoJoinPluginChannelParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "client": { "description": "Client where channel exists", "minLength": 1, "title": "Client", "type": "string" }, "channel": { "description": "Name of channel to remain joined", "minLength": 1, "title": "Channel", "type": "string" } }, "required": [ "client", "channel" ], "title": "AutoJoinPluginChannelParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "channels" ] }
- Config:
extra: str = forbid
- Fields:
- field channels: Annotated[list[AutoJoinPluginChannelParams], FieldInfo(annotation=NoneType, required=True, description='Which channels to maintain join', metadata=[MinLen(min_length=1)])] [Required]#
Which channels to maintain join
- Constraints:
min_length = 1
- field interval: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=5, description='Interval when channels are joined', metadata=[Ge(ge=5), Le(le=300)])] = 5#
Interval when channels are joined
- Constraints:
ge = 5
le = 300
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
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.
- property params: AutoNickPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[AutoNickPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- pydantic model enrobie.plugins.AutoNickPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "AutoNickPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "clients": { "description": "List of clients to enable plugin", "items": { "type": "string" }, "minItems": 1, "title": "Clients", "type": "array" }, "interval": { "default": 5, "description": "Interval when nick is validated", "maximum": 300, "minimum": 5, "title": "Interval", "type": "integer" }, "services": { "anyOf": [ { "items": { "$ref": "#/$defs/AutoNickPluginServiceParams" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "How to identify with services", "title": "Services" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "AutoNickPluginServiceParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "client": { "description": "Client where services exist", "minLength": 1, "title": "Client", "type": "string" }, "password": { "description": "Identify with nick services", "minLength": 1, "title": "Password", "type": "string" }, "service": { "default": "NickServ", "description": "Nickname of network service", "minLength": 1, "title": "Service", "type": "string" } }, "required": [ "client", "password" ], "title": "AutoNickPluginServiceParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "clients" ] }
- Config:
extra: str = forbid
- Fields:
- field clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])] [Required]#
List of clients to enable plugin
- Constraints:
min_length = 1
- field interval: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=5, description='Interval when nick is validated', metadata=[Ge(ge=5), Le(le=300)])] = 5#
Interval when nick is validated
- Constraints:
ge = 5
le = 300
- field services: Annotated[list[AutoNickPluginServiceParams] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='How to identify with services')] = None#
How to identify with services
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
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.
- ainswer() list[Callable[[...], Any]] [source]#
Return the Ainswer tools that are related to the plugin.
- Returns:
Ainswer tools that are related to the plugin.
- operate() None [source]#
Perform the operation related to Robie service threads.
- Parameters:
thread – Child class instance for Chatting Robie.
- 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.
- classmethod schema() Type[HomiePluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- pydantic model enrobie.plugins.HomiePluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "HomiePluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "command": { "$ref": "#/$defs/HomiePluginCommandParams", "description": "Command name per chat platform" }, "restful": { "description": "Where to find the RESTful API", "examples": [ "http://localhost:8420" ], "minLength": 1, "title": "Restful", "type": "string" }, "username": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Authenticate with the service", "title": "Username" }, "password": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Authenticate with the service", "title": "Password" }, "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" }, "clients": { "description": "List of clients to enable plugin", "items": { "type": "string" }, "minItems": 1, "title": "Clients", "type": "array" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "HomiePluginCommandParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "irc": { "default": "!persist", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!persist", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!persist", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "title": "HomiePluginCommandParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "restful", "clients" ] }
- Config:
extra: str = forbid
- Fields:
- field clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])] [Required]#
List of clients to enable plugin
- Constraints:
min_length = 1
- field command: Annotated[HomiePluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=HomiePluginCommandParams, description='Command name per chat platform')] [Optional]#
Command name per chat platform
- field password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])] = None#
Authenticate with the service
- Constraints:
min_length = 1
- field restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])] [Required]#
Where to find the RESTful API
- Constraints:
min_length = 1
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
Verify the ceritifcate valid
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
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.
- property history: LoggerHistory#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: LoggerPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[LoggerPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- pydantic model enrobie.plugins.LoggerPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "LoggerPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "database": { "default": "sqlite:///:memory:", "description": "Database connection string", "minLength": 1, "title": "Database", "type": "string" }, "histories": { "default": 100, "description": "Number of messages per anchor", "maximum": 10000, "minimum": 1, "title": "Histories", "type": "integer" }, "clients": { "description": "List of clients to enable plugin", "items": { "type": "string" }, "minItems": 1, "title": "Clients", "type": "array" }, "output": { "anyOf": [ { "minLength": 4, "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional path where logs append", "title": "Output" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "clients" ] }
- Config:
extra: str = forbid
- Fields:
- field clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])] [Required]#
List of clients to enable plugin
- Constraints:
min_length = 1
- field database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])] = 'sqlite:///:memory:'#
Database connection string
- Constraints:
min_length = 1
- field histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=100, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=10000)])] = 100#
Number of messages per anchor
- Constraints:
ge = 1
le = 10000
- field output: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional path where logs append', metadata=[MinLen(min_length=4)])] = None#
Optional path where logs append
- Constraints:
min_length = 4
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
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.
- ainswer() list[Callable[[...], Any]] [source]#
Return the Ainswer tools that are related to the plugin.
- Returns:
Ainswer tools that are related to the plugin.
- 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.
- property params: NagiosPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[NagiosPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- pydantic model enrobie.plugins.NagiosPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "NagiosPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "command": { "$ref": "#/$defs/NagiosPluginCommandParams", "description": "Command name per chat platform" }, "restful": { "description": "Where to find the RESTful API", "examples": [ "http://localhost:8420" ], "minLength": 1, "title": "Restful", "type": "string" }, "username": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Authenticate with the service", "title": "Username" }, "password": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Authenticate with the service", "title": "Password" }, "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" }, "clients": { "description": "List of clients to enable plugin", "items": { "type": "string" }, "minItems": 1, "title": "Clients", "type": "array" }, "status": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per chat platform" } }, "$defs": { "NagiosPluginCommandParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "irc": { "default": "!nagios", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!nagios", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!nagios", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "title": "NagiosPluginCommandParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" } }, "additionalProperties": false, "required": [ "restful", "clients" ] }
- Config:
extra: str = forbid
- Fields:
- field clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])] [Required]#
List of clients to enable plugin
- Constraints:
min_length = 1
- field command: Annotated[NagiosPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=NagiosPluginCommandParams, description='Command name per chat platform')] [Optional]#
Command name per chat platform
- field password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])] = None#
Authenticate with the service
- Constraints:
min_length = 1
- field restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])] [Required]#
Where to find the RESTful API
- Constraints:
min_length = 1
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
Verify the ceritifcate valid
- field status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')] [Optional]#
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.
- property params: StatusPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- classmethod schema() Type[StatusPluginParams] [source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property status: StatusPluginItems#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- 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.
- pydantic model enrobie.plugins.StatusPluginIconParams[source]#
Bases:
RobieParamsModel
Contain information for constructing the chat messages.
Show JSON schema
{ "title": "StatusPluginIconParams", "description": "Contain information for constructing the chat messages.", "type": "object", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field dsc: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Icon used for the chat platform', metadata=[MinLen(min_length=1)])] = None#
Icon used for the chat platform
- Constraints:
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.
- icon: StatusPluginIconParams#
- pydantic model enrobie.plugins.StatusPluginParams[source]#
Bases:
RobiePluginParams
Process and validate the Robie configuration parameters.
Show JSON schema
{ "title": "StatusPluginParams", "description": "Process and validate the Robie configuration parameters.", "type": "object", "properties": { "enable": { "default": false, "description": "Determine whether child enabled", "title": "Enable", "type": "boolean" }, "locate": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "For which plugin are parameters", "examples": [ "enrobie.plugins.AinswerPlugin", "enrobie.plugins.AutoJoinPlugin", "enrobie.plugins.AutoNickPlugin", "enrobie.plugins.StatusPlugin" ], "title": "Locate" }, "trusted": { "anyOf": [ { "items": { "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users are trusted by the plugin", "title": "Trusted" }, "reports": { "anyOf": [ { "items": { "$ref": "#/$defs/StatusPluginReportParams" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Where to send status updates", "title": "Reports" }, "command": { "$ref": "#/$defs/StatusPluginCommandParams", "description": "Command name per chat platform" }, "icons": { "$ref": "#/$defs/StatusPluginIconsParams", "description": "Icon used per the chat platform" } }, "$defs": { "StatusPluginCommandParams": { "additionalProperties": false, "description": "Process and validate the Robie configuration parameters.", "properties": { "irc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Irc", "type": "string" }, "dsc": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Dsc", "type": "string" }, "mtm": { "default": "!status", "description": "Command name for chat platform", "minLength": 2, "title": "Mtm", "type": "string" } }, "title": "StatusPluginCommandParams", "type": "object" }, "StatusPluginIconParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "irc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Irc" }, "dsc": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Dsc" }, "mtm": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Icon used for the chat platform", "title": "Mtm" } }, "title": "StatusPluginIconParams", "type": "object" }, "StatusPluginIconsParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "pending": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "normal": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "failure": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" }, "unknown": { "$ref": "#/$defs/StatusPluginIconParams", "description": "Icon used per the chat platform" } }, "title": "StatusPluginIconsParams", "type": "object" }, "StatusPluginReportParams": { "additionalProperties": false, "description": "Contain information for constructing the chat messages.", "properties": { "client": { "description": "Client where channel exists", "minLength": 1, "title": "Client", "type": "string" }, "target": { "description": "Where the message will be sent", "minLength": 1, "title": "Target", "type": "string" }, "states": { "anyOf": [ { "items": { "enum": [ "pending", "normal", "failure", "unknown" ], "type": "string" }, "minItems": 1, "type": "array" }, { "type": "null" } ], "default": null, "description": "Which status value are related", "title": "States" }, "delay": { "default": 15, "description": "Period between status reports", "maximum": 864000, "minimum": 0, "title": "Delay", "type": "integer" } }, "required": [ "client", "target" ], "title": "StatusPluginReportParams", "type": "object" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field command: Annotated[StatusPluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginCommandParams, description='Command name per chat platform')] [Optional]#
Command name per chat platform
- field icons: Annotated[StatusPluginIconsParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconsParams, description='Icon used per the chat platform')] [Optional]#
Icon used per the chat platform