Arcana::Service
A non-LLM service that listens on the Bus and handles requests using a fixed handler block. Validates input against a schema and follows the Protocol handshake automatically.
svc = Arcana::Service.new( bus: bus, directory: dir, address: "arcana:resizer", # owner:capability name: "Image Resizer", description: "Resizes images to specified dimensions", schema: JSON.parse(%({"type":"object","properties":{...},"required":["path","width"]})), tags: ["image"], ) do |data| # data is the validated JSON::Any payload path = data["path"].as_s JSON::Any.new({"output" => JSON::Any.new("/tmp/resized.png")}) end
svc.start # spawns a listener fiber
Constructors
Instance methods
address
Source