Module: Ace::Hitl::CLI::Commands::LifecycleCommand
- Included in:
- Cancel, Consume, Deliver, Duty, OverseerAck, OverseerPending, OverseerSend, Pending, States
- Defined in:
- lib/ace/hitl/cli/commands/lifecycle_command.rb
Overview
Shared plumbing for the operator/broker lifecycle commands (spec 8wm.t.y21 §8): the store is built through the provider=lab seam and machine outputs are one JSON line, byte-compatible with the migrated CLI contract.
Constant Summary collapse
- STDIN_READER =
->(limit) { $stdin.read(limit) }.freeze
Instance Method Summary collapse
- #emit(result) ⇒ Object
- #lifecycle_store(store: nil) ⇒ Object
- #overseer ⇒ Object
- #raise_lifecycle_error(message) ⇒ Object
Instance Method Details
#emit(result) ⇒ Object
25 26 27 |
# File 'lib/ace/hitl/cli/commands/lifecycle_command.rb', line 25 def emit(result) puts JSON.generate(result) end |
#lifecycle_store(store: nil) ⇒ Object
16 17 18 |
# File 'lib/ace/hitl/cli/commands/lifecycle_command.rb', line 16 def lifecycle_store(store: nil) Providers::Lab.lifecycle_store(store: store) end |
#overseer ⇒ Object
20 21 22 23 |
# File 'lib/ace/hitl/cli/commands/lifecycle_command.rb', line 20 def overseer channel_root = ENV.fetch("ACE_HITL_OVERSEER_CHANNEL_ROOT", "/lab/state/overseer-channel") Lifecycle::Overseer.new(outbox_dir: File.join(channel_root, "outbox")) end |
#raise_lifecycle_error(message) ⇒ Object
29 30 31 |
# File 'lib/ace/hitl/cli/commands/lifecycle_command.rb', line 29 def raise_lifecycle_error() raise Ace::Support::Cli::Error.new() end |