/- *neyre, coki /+ dbug, cokil=coki /= router /web/router =| sessions:coki =* sessions - =| versioned-state =* state - %- agent:dbug ^- agent:gall |_ =bowl:gall +* this . cokilib ~(. cokil [sessions bowl]) ++ on-init ^- (quip card:agent:gall agent:gall) :_ this =/ weblib router(bowl bowl) =/ weblib2 weblib(base-path /) :~ (eyre-binding-card:weblib2 /) (eyre-binding-card:weblib2 /[dap.bowl]) == :: ++ on-save ^- vase !>(state) :: ++ on-load |~ old-state=vase ^- (quip card:agent:gall agent:gall) =/ vs !<(versioned-state old-state) ~& vs=vs =. state ?- -.vs %0 vs == `this :: ++ on-poke |= [=mark =vase] ^- (quip card:agent:gall agent:gall) ?+ mark `this %coki =^ cards sessions (handle-self-poke:cokilib !<(self-poke:coki vase)) [cards this] %handle-http-request ~& "handling http" =/ order !<([id=@ta req=inbound-request:eyre] vase) =/ weblib ~(. router [bowl id.order req.order state sessions]) =/ weblib2 weblib(base-path /) :- route:weblib2 this %noun ~& > s=sessions `this == :: ++ on-watch |~ path ^- (quip card:agent:gall agent:gall) `this :: ++ on-leave |~ path ^- (quip card:agent:gall agent:gall) `this :: ++ on-peek |~ path ^- (unit (unit cage)) ~ :: ++ on-agent |~ [wire sign:agent:gall] ^- (quip card:agent:gall agent:gall) `this :: ++ on-arvo |~ [wire =sign-arvo] ^- (quip card:agent:gall agent:gall) `this :: ++ on-fail |~ [term tang] ^- (quip card:agent:gall agent:gall) `this --