Raxol.Terminal.Script.UnifiedScript (Raxol v0.5.0)

View Source

Unified scripting system for the Raxol terminal emulator. Handles script execution, management, and integration with the terminal.

Summary

Functions

Returns a specification to start this module under a supervisor.

Executes a script with optional arguments.

Exports a script to a file.

Gets the output of a script.

Gets the state of a script.

Gets all loaded scripts.

Imports a script from a file.

Loads a script from a file or string source.

Pauses a running script.

Resumes a paused script.

Stops a running script.

Unloads a script by its ID.

Updates a script's configuration.

Types

script_id()

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

script_state()

@type script_state() :: %{
  id: script_id(),
  name: String.t(),
  type: script_type(),
  source: String.t(),
  config: map(),
  status: :idle | :running | :paused | :error,
  error: String.t() | nil,
  output: [String.t()],
  metadata: map()
}

script_type()

@type script_type() :: :lua | :python | :javascript | :elixir

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

execute_script(script_id, args \\ [])

Executes a script with optional arguments.

export_script(script_id, path)

Exports a script to a file.

get_script_output(script_id)

Gets the output of a script.

get_script_state(script_id)

Gets the state of a script.

get_scripts(opts \\ [])

Gets all loaded scripts.

import_script(path, opts \\ [])

Imports a script from a file.

load_script(source, type, opts \\ [])

Loads a script from a file or string source.

pause_script(script_id)

Pauses a running script.

resume_script(script_id)

Resumes a paused script.

start_link(opts \\ [])

stop_script(script_id)

Stops a running script.

unload_script(script_id)

Unloads a script by its ID.

update_script_config(script_id, config)

Updates a script's configuration.