As a stepping stone to composing full %gall
apps, we propose %hob
, a userspace framework for producing “toy” agent-like applications, called brownies.
Like %spider
, %hob
is itself a %gall
agent that instruments other running processes. It wraps the %hob
mini-agent, or brownie, with the standard Gall-scale boilerplate (including +dbug
), allowing for straightforward interaction with the running brownie through the Dojo.
The brownie's state is defined in a $state
block at the top of its file, e.g.:
+$ state
$: scores=(list @)
hi-score=@
==
Brownies do not support state upgrades, so no head tag is provided. They are more permanent than %spider
or %khan
threads but less permanent than agents.
A brownie requires only the following arms for the developer:
|%
++ on-init
++ on-poke
++ on-peek
++ on-fact
--
Unlike the regular %gall
pubsub model, a brownie will unify received gifts in ++on-fact
. It only knows about %fact
s, and the %hob
framework should be prepared to implicitly handle other results.
A brownie specification file is NOT implicitly chained with a running =>
tisgal.