Something went wrong. Try again.
Personal fork of prime agent. Mirror of: https://mnemosyne.sigilzero.dev/sigilzero/prime-agent
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930-- A small stateful plugin, exercised only through PluginHost.local count = 0return { exports = { {name = "count", run = function(input, ctx) count = count + 1 return count end}, {name = "bad_emit", run = function(input, ctx) ctx.emit("not allowed") end}, {name = "bad_result", run = function(input, ctx) return function() end end} }, commands = { {name = "remember", mode = "streaming", run = function(input, ctx) ctx.emit({stage = "started"}) local result = ctx.call("auxiliary", input) ctx.emit({stage = "completed"}) return result end} }, hooks = { {name = "annotate", run = function(input, ctx) return {text = "ledger:" .. input.text} end} }}