Lux.Company.Objective (Lux v0.5.0)
View SourceDefines the structure of an objective within a company.
An objective represents a specific goal that needs to be achieved by the company's agents. Each objective has:
- A unique identifier
- A name and description
- Success criteria
- A list of steps to achieve it
- Status tracking
- Assigned agents
Summary
Functions
Returns true if the objective is active (in progress).
Assigns an agent to the objective.
Returns true if the objective can be started.
Completes the objective if it's in progress.
Returns true if the objective is completed.
Returns the duration of the objective if it has started. Returns nil if the objective hasn't started.
Marks the objective as failed with an optional reason.
Returns true if the objective has failed.
Creates a new objective with the given attributes.
Starts the objective if it's in pending status.
Updates the progress of an objective. Progress should be an integer between 0 and 100.
Types
@type status() :: :pending | :in_progress | :completed | :failed
@type t() :: %Lux.Company.Objective{ assigned_agents: [String.t()], completed_at: DateTime.t() | nil, description: String.t(), id: String.t(), input_schema: map() | nil, metadata: map(), name: atom(), progress: integer(), started_at: DateTime.t() | nil, status: status(), steps: [String.t()], success_criteria: String.t() }
Functions
Returns true if the objective is active (in progress).
Assigns an agent to the objective.
Returns true if the objective can be started.
Completes the objective if it's in progress.
Returns true if the objective is completed.
Returns the duration of the objective if it has started. Returns nil if the objective hasn't started.
Marks the objective as failed with an optional reason.
Returns true if the objective has failed.
Creates a new objective with the given attributes.
Starts the objective if it's in pending status.
Updates the progress of an objective. Progress should be an integer between 0 and 100.