Module: ActiveMatrix
- Defined in:
- app/models/active_matrix/agent.rb,
lib/active_matrix.rb,
lib/active_matrix/api.rb,
lib/active_matrix/bot.rb,
lib/active_matrix/cli.rb,
lib/active_matrix/mxid.rb,
lib/active_matrix/room.rb,
lib/active_matrix/user.rb,
lib/active_matrix/client.rb,
lib/active_matrix/daemon.rb,
lib/active_matrix/engine.rb,
lib/active_matrix/errors.rb,
lib/active_matrix/events.rb,
lib/active_matrix/memory.rb,
lib/active_matrix/logging.rb,
lib/active_matrix/metrics.rb,
lib/active_matrix/railtie.rb,
lib/active_matrix/version.rb,
lib/active_matrix/response.rb,
lib/active_matrix/cacheable.rb,
lib/active_matrix/telemetry.rb,
lib/active_matrix/extensions.rb,
lib/active_matrix/uri_module.rb,
lib/active_matrix/async_query.rb,
lib/active_matrix/client_pool.rb,
lib/active_matrix/memory/base.rb,
lib/active_matrix/event_router.rb,
lib/active_matrix/agent_manager.rb,
lib/active_matrix/daemon/worker.rb,
lib/active_matrix/agent_registry.rb,
lib/active_matrix/instrumentation.rb,
lib/active_matrix/presence_manager.rb,
lib/active_matrix/state_event_cache.rb,
app/models/active_matrix/agent_store.rb,
lib/active_matrix/account_data_cache.rb,
lib/active_matrix/bot/command_parser.rb,
lib/active_matrix/message_dispatcher.rb,
app/models/active_matrix/chat_session.rb,
lib/active_matrix/connection_registry.rb,
lib/active_matrix/daemon/probe_server.rb,
lib/active_matrix/memory/agent_memory.rb,
app/jobs/active_matrix/application_job.rb,
lib/active_matrix/bot/builtin_commands.rb,
lib/active_matrix/memory/global_memory.rb,
app/models/active_matrix/knowledge_base.rb,
lib/active_matrix/daemon/signal_handler.rb,
app/models/active_matrix/application_record.rb,
lib/active_matrix/memory/conversation_memory.rb,
lib/generators/active_matrix/bot/bot_generator.rb,
app/models/active_matrix/agent/jobs/memory_reaper.rb,
lib/generators/active_matrix/install/install_generator.rb
Overview
<rails-lens:schema:begin> connection = “primary” database_dialect = “SQLite” database_version = “3.50.4”
# This is an abstract class that establishes a database connection # but does not have an associated table. <rails-lens:schema:end>
Defined Under Namespace
Modules: AsyncQuery, Bot, Cacheable, Errors, Extensions, Generators, Instrumentation, Logging, Memory, Response, Rooms, Telemetry, Uri Classes: AccountDataCache, Agent, AgentAlreadyRunningError, AgentManager, AgentRegistry, AgentStore, Api, ApplicationJob, ApplicationRecord, CLI, ChatSession, Client, ClientPool, Configuration, ConnectionRegistry, Daemon, Engine, ErrorEvent, Event, EventHandlerArray, EventRouter, KnowledgeBase, MXID, MatrixEvent, MessageDispatcher, Metrics, PresenceManager, Railtie, Room, StateEventCache, User
Constant Summary collapse
- Loader =
Set up Zeitwerk loader
Zeitwerk::Loader.for_gem
- MatrixError =
Make error classes available at the top level for backward compatibility
Errors::MatrixError
- MatrixRequestError =
Errors::MatrixRequestError
- MatrixNotAuthorizedError =
Errors::MatrixNotAuthorizedError
- MatrixForbiddenError =
Errors::MatrixForbiddenError
- MatrixNotFoundError =
Errors::MatrixNotFoundError
- MatrixConflictError =
Errors::MatrixConflictError
- MatrixTooManyRequestsError =
Errors::MatrixTooManyRequestsError
- MatrixConnectionError =
Errors::MatrixConnectionError
- MatrixTimeoutError =
Errors::MatrixTimeoutError
- MatrixUnexpectedResponseError =
Errors::MatrixUnexpectedResponseError
- VERSION =
'0.0.15'
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
- .logger ⇒ Object
Class Method Summary collapse
-
.client(name = :primary) ⇒ ActiveMatrix::Client
Get a client for a named connection.
- .configure {|@config| ... } ⇒ Object
-
.connection(name = :primary) ⇒ Hash
Get connection configuration by name.
-
.connection_exists?(name) ⇒ Boolean
Check if a connection exists.
-
.connection_names ⇒ Array<String>
List all available connection names.
- .debug! ⇒ Object
- .global_logger? ⇒ Boolean
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
15 16 17 |
# File 'lib/active_matrix.rb', line 15 def config @config end |
.logger ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/active_matrix.rb', line 61 def logger @logger ||= if defined?(::Rails) && ::Rails.respond_to?(:logger) ::Rails.logger else require 'logger' ::Logger.new($stdout) end end |
Class Method Details
.client(name = :primary) ⇒ ActiveMatrix::Client
Get a client for a named connection
88 89 90 |
# File 'lib/active_matrix.rb', line 88 def client(name = :primary) ConnectionRegistry.instance.client(name) end |
.configure {|@config| ... } ⇒ Object
17 18 19 20 21 |
# File 'lib/active_matrix.rb', line 17 def configure @config ||= Configuration.new yield @config if block_given? @config end |
.connection(name = :primary) ⇒ Hash
Get connection configuration by name
95 96 97 |
# File 'lib/active_matrix.rb', line 95 def connection(name = :primary) ConnectionRegistry.instance.connection(name) end |
.connection_exists?(name) ⇒ Boolean
Check if a connection exists
102 103 104 |
# File 'lib/active_matrix.rb', line 102 def connection_exists?(name) ConnectionRegistry.instance.connection_exists?(name) end |
.connection_names ⇒ Array<String>
List all available connection names
108 109 110 |
# File 'lib/active_matrix.rb', line 108 def connection_names ConnectionRegistry.instance.connection_names end |
.debug! ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/active_matrix.rb', line 70 def debug! logger.level = if defined?(::Rails) :debug else ::Logger::DEBUG end end |
.global_logger? ⇒ Boolean
78 79 80 |
# File 'lib/active_matrix.rb', line 78 def global_logger? instance_variable_defined?(:@logger) end |