Raxol.Terminal.Extension.UnifiedExtension (Raxol v0.5.0)

View Source

Unified extension system for the Raxol terminal emulator. Handles extension management, integration, and communication with the terminal.

Summary

Functions

Activates an extension.

Returns a specification to start this module under a supervisor.

Deactivates an extension.

Exports an extension to a file or directory.

Gets the state of an extension.

Gets all loaded extensions.

Imports an extension from a file or directory.

Loads an extension from a file or directory.

Registers a hook for an extension.

Triggers a hook for all registered extensions.

Unloads an extension by its ID.

Unregisters a hook for an extension.

Updates an extension's configuration.

Types

extension_id()

@type extension_id() :: String.t()

extension_state()

@type extension_state() :: %{
  id: extension_id(),
  name: String.t(),
  type: extension_type(),
  version: String.t(),
  description: String.t(),
  author: String.t(),
  license: String.t(),
  config: map(),
  status: :idle | :active | :error,
  error: String.t() | nil,
  metadata: map(),
  dependencies: [String.t()],
  hooks: [String.t()],
  commands: [String.t()]
}

extension_type()

@type extension_type() :: :theme | :script | :plugin | :custom

Functions

activate_extension(extension_id)

Activates an extension.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

deactivate_extension(extension_id)

Deactivates an extension.

execute_command(extension_id, command, args \\ [])

Executes an extension command.

export_extension(extension_id, path)

Exports an extension to a file or directory.

get_extension_state(extension_id)

Gets the state of an extension.

get_extensions(opts \\ [])

Gets all loaded extensions.

import_extension(path, opts \\ [])

Imports an extension from a file or directory.

load_extension(path, type, opts \\ [])

Loads an extension from a file or directory.

register_hook(extension_id, hook_name, callback)

Registers a hook for an extension.

start_link(opts \\ [])

trigger_hook(hook_name, args \\ [])

Triggers a hook for all registered extensions.

unload_extension(extension_id)

Unloads an extension by its ID.

unregister_hook(extension_id, hook_name)

Unregisters a hook for an extension.

update_extension_config(extension_id, config)

Updates an extension's configuration.