@@ -0,0 +1,169 @@
2+/+ default-agent, verb, dbug
8+ +$ card card:agent:gall
14+ published=directory:s
24+ def ~(. (default-agent this %.n) bowl)
36+ =/ old=(unit state-0)
37+ (mole |.(!<(state-0 vase)))
38+ ?^ old `this(state u.old)
39+ ~& >>> "Incompatible load, nuking"
40+ =^ cards this on-init
43+ %+ turn ~(tap in ~(key by wex.bowl))
44+ |= [=wire =ship =term]
46+ [%pass wire %agent [ship term] %leave ~]
52+ abet:(poke:cor mark vase)
58+ abet:(watch:cor path)
63+ ++ on-leave on-leave:def
64+ ++ on-fail on-fail:def
67+ |= [=wire =sign:agent:gall]
70+ abet:(agent:cor wire sign)
73+ |= [=wire sign=sign-arvo]
76+ abet:(arvo:cor wire sign)
79+|_ [=bowl:gall cards=(list card)]
80+++ abet [(flop cards) state]
82+++ emit |=(=card cor(cards [card cards]))
83+++ give |=(=gift:agent:gall (emit %give gift))
90+ ?+ mark ~|(bad-poke/mark !!)
92+ =+ !<(=notice:s vase)
98+ ?> =(src.bowl source.q.notice)
99+ ?> =(p.notice (digest q.notice))
100+ di-abet:(di-init:(di-abed:di-core p.notice) q.notice)
108+ |= [=wire =sign:agent:gall]
112+ |= [=wire sign=sign-arvo]
118+ ^- (unit (unit cage))
125+ %+ sort (~(gut by lookup) i.t.t.path *(list entry:s))
126+ |= [a=entry:s b=entry:s]
128+ |=(=entry:s hash.entry)
130+ (~(got by directory) hash)
134+++ from-self =(our src):bowl
136+ |_ [=listing:s =hash:s]
139+ cor(directory (~(put by directory) hash listing))
142+ di-core(hash h, listing (~(gut by directory) h *listing:s))
149+ :~ ~[[title.l ~[[hash rank=0]]]]
153+ [tag ~[[hash rank=1]]]
155+ (sift:sift description.l)
157+ [word ~[[hash rank=2]]]
162+ %- ~(uni by entries)
164+ |= [=key:s value=(list entry:s)]
165+ ?. (~(has by entries) key) value
166+ (weld value (~(got by entries) key))