diff --git a/pkg/arvo/app/verb-logger.hoon b/pkg/arvo/app/verb-logger.hoon index 6b92a9c8ee..b23e5b2256 100644 --- a/pkg/arvo/app/verb-logger.hoon +++ b/pkg/arvo/app/verb-logger.hoon @@ -28,11 +28,7 @@ ?> ?=(^ events) (sub now.i.events (mod now.i.events write-interval)) =/ vex=@ - %- en:json:html - :- %a - %+ roll events ::NOTE we +roll to +turn & +flop simultaneously - |= [event=event-plus:verb out=(list json)] - [(event:enjs event) out] + (en:json:html (events:enjs our dude events)) [%pass /write/[dude] %agent [our %hood] %poke %drum-put !>([pax vex])]~ :: ++ ingest-event @@ -54,42 +50,70 @@ ++ enjs =, enjs:format |% + ++ events + |= [our=@p =dude:gall events=(list event-plus:verb)] :: latest-first + =/ first=event-plus:verb (rear events) + %- pairs + :~ 'ship'^s+(scot %p our) + 'dude'^s+dude + 'from'^(time now.first) + :: + :- 'events' + :- %a + %+ roll events ::NOTE we +roll to +turn & +flop simultaneously + |= [event=event-plus:verb out=(list json)] + [(event:enjs event) out] + == ++ event |= event-plus:verb %- pairs :~ 'act'^(numb act) 'now'^(time now) :: ms timestamp, lossy-ness is fine here 'src'^s+(scot %p src) - 'cause'^(^cause cause) + 'kind'^s+-.cause + 'deets'^(^cause cause) 'effects'^a+(turn effects effect) == :: ++ cause |= =cause:verb - %+ frond -.cause + ^- json ?- -.cause %on-init b+& %on-load b+& - %on-poke s+mark.cause + %on-poke (pairs 'mark'^s+mark.cause 'mug'^(mug mug.cause) ~) %on-watch (path path.cause) %on-leave (path path.cause) %on-agent %- pairs - :~ 'wire'^(path wire.cause) - 'sign'^s+sign.cause - 'mug'^(mug mug.cause) - == + :~ 'wire'^(path wire.cause) + 'sign'^s+-.sign.cause + :: + :- 'deets' + ?- -.sign.cause + %poke-ack b+ack.sign.cause + %watch-ack b+ack.sign.cause + %kick ~ + %fact %- pairs + :~ 'mark'^s+mark.sign.cause + 'mug'^(mug mug.sign.cause) + == + == + == %on-arvo %- pairs - :~ 'wire'^(path wire.cause) - 'vane'^s+vane.cause - 'sign'^s+sign.cause - == + :~ 'wire'^(path wire.cause) + 'vane'^s+vane.cause + 'sign'^s+sign.cause + == %on-fail s+term.cause == :: ++ effect |= effect:verb ^- json - %+ frond +<- + %- pairs + :- 'kind'^s++<- + :_ ~ + :- 'deets' %- pairs ^- (list [@t json]) ?- +<- diff --git a/pkg/base-dev/lib/verb.hoon b/pkg/base-dev/lib/verb.hoon index 022f8e039d..4778699aa7 100644 --- a/pkg/base-dev/lib/verb.hoon +++ b/pkg/base-dev/lib/verb.hoon @@ -47,7 +47,7 @@ :_ this :_ :_ cards (emit-event %on-poke mark) - (emit-event-plus bowl [%on-poke mark] cards) + (emit-event-plus bowl [%on-poke mark (mug q.vase)] cards) :: ++ on-watch |= =path @@ -88,7 +88,14 @@ :_ this :_ :_ cards (emit-event %on-agent wire -.sign) - (emit-event-plus bowl [%on-agent wire -.sign (mug +.sign)] cards) + =; =^sign + (emit-event-plus bowl [%on-agent wire sign] cards) + ?- -.sign + %poke-ack [%poke-ack ?=(~ p.sign)] + %watch-ack [%watch-ack ?=(~ p.sign)] + %kick [%kick ~] + %fact [%fact p.cage.sign (mug q.q.cage.sign)] + == :: ++ on-arvo |= [=wire =sign-arvo] diff --git a/pkg/base-dev/sur/verb.hoon b/pkg/base-dev/sur/verb.hoon index 3508dc669a..6ef5b6e0b3 100644 --- a/pkg/base-dev/sur/verb.hoon +++ b/pkg/base-dev/sur/verb.hoon @@ -21,14 +21,21 @@ +$ cause $% [%on-init ~] [%on-load ~] - [%on-poke =mark] + [%on-poke =mark mug=@ux] [%on-watch =path] [%on-leave =path] - [%on-agent =wire sign=term mug=@ux] ::TODO %fact should show mark? + [%on-agent =wire =sign] [%on-arvo =wire vane=term sign=term] [%on-fail =term] == :: ++$ sign + $% [%poke-ack ack=?] + [%watch-ack ack=?] + [%kick ~] + [%fact =mark mug=@ux] + == +:: +$ effect $% [%poke =wire =gill:gall =mark mug=@ux] [%watch =wire =gill:gall =path]