Class: PWN::Plugins::REPL::AISwarm::JobControl
- Inherits:
-
AI::Agent::Loop::Steering
- Object
- AI::Agent::Loop::Steering
- PWN::Plugins::REPL::AISwarm::JobControl
- Defined in:
- lib/pwn/plugins/repl/ai_swarm.rb
Overview
One cancellable persona job. Model waits can be interrupted; tools finish.
Defined Under Namespace
Classes: Stopped
Constant Summary
Constants inherited from AI::Agent::Loop::Steering
AI::Agent::Loop::Steering::INPUT_LOCK, AI::Agent::Loop::Steering::INPUT_OWNERS
Instance Attribute Summary
Attributes inherited from AI::Agent::Loop::Steering
Instance Method Summary collapse
Methods inherited from AI::Agent::Loop::Steering
#initialize, #model, #submit, #with_reader
Constructor Details
This class inherits a constructor from PWN::AI::Agent::Loop::Steering
Instance Method Details
#check_stop ⇒ Object
29 30 31 |
# File 'lib/pwn/plugins/repl/ai_swarm.rb', line 29 def check_stop raise Stopped, 'Swarm job cancelled at a safe boundary; completed work is not undone.' if @stopping end |
#checkpoint(messages:, phase: :boundary, &block) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/pwn/plugins/repl/ai_swarm.rb', line 21 def checkpoint(messages:, phase: :boundary, &block) if @stopping block&.call raise Stopped, 'Swarm job cancelled at a safe boundary; completed work is not undone.' end super end |
#stop ⇒ Object
16 17 18 19 |
# File 'lib/pwn/plugins/repl/ai_swarm.rb', line 16 def stop @stopping = true submit('Stop this swarm job.') end |