Spectre.Skill.Mount (Spectre v0.3.0)

Copy Markdown View Source

Compile-time mount of a reusable Spectre.Skill inside an Agent.

A mount assigns a local identifier and binds logical Skill action names to concrete actions owned by the outer Agent.

Summary

Functions

Builds and validates a Skill mount from a compiled definition.

Returns the runtime scope represented by a mount.

Types

t()

@type t() :: %Spectre.Skill.Mount{
  bindings: map(),
  definition_id: term(),
  definition_version: pos_integer(),
  id: term(),
  module: module(),
  opts: keyword()
}

Functions

new(module, definition, opts)

@spec new(module(), Spectre.Definition.t(), keyword()) :: t()

Builds and validates a Skill mount from a compiled definition.

scope(mount)

@spec scope(t()) :: {:skill, term()}

Returns the runtime scope represented by a mount.