dm-hook: reload agents on dm-hook state change
This fixes the %notify bug that prevented dms from coming through.
::
+$ state-0 [%0 base-state-0]
+$ state-1 [%1 base-state-0]
++$ state-2 [%2 base-state-0]
+$ versioned-state
$% state-0
state-1
+ state-2
==
+$ card card:agent:gall
+$ nodes (map index:store node:store)
++ orm orm:store
--
::
-=| state-1
+=| state-2
=* state -
%- agent:dbug
^- agent:gall
::
++ on-save !>(state)
++ on-load
- |= =vase
+ |= =old=vase
^- (quip card _this)
- =+ !<(old=versioned-state vase)
- ?: ?=(%1 -.old) `this(state old)
- :_ this(state [%1 +.old])
- (poke-self:pass noun+!>(%reinit))^~
+ =+ !<(old=versioned-state old-vase)
+ =| cards=(list card)
+ |-
+ ?- -.old
+ %0
+ %_($ -.old %1)
+ %1
+ %_ $
+ -.old %2
+ cards (weld cards (poke-our:pass %goad noun+!>(%force))^~)
+ ==
+ %2
+ :_ this(state old)
+ (weld cards (poke-self:pass noun+!>(%reinit))^~)
+ ==
::
++ on-poke
|= [=mark =vase]
