Module: Strata::CLI::AgentOutput
- Defined in:
- lib/strata/cli/agent_output.rb
Class Method Summary collapse
Class Method Details
.emit_error(message, code: "agent_mode_unsupported", **metadata) ⇒ Object
14 15 16 17 18 |
# File 'lib/strata/cli/agent_output.rb', line 14 def emit_error(, code: "agent_mode_unsupported", **) payload = {error: , code: code}.merge() warn(JSON.generate(payload)) exit(1) end |
.emit_json(data) ⇒ Object
10 11 12 |
# File 'lib/strata/cli/agent_output.rb', line 10 def emit_json(data) $stdout.puts(JSON.generate(data)) end |