2021-02-02 00:28:52 +03:00
|
|
|
/+ store=contact-store, res=resource, contact, group,
|
|
|
|
default-agent, dbug, push-hook
|
2021-01-20 00:07:11 +03:00
|
|
|
~% %contact-push-hook-top ..part ~
|
|
|
|
|%
|
|
|
|
+$ card card:agent:gall
|
|
|
|
++ config
|
|
|
|
^- config:push-hook
|
|
|
|
:* %contact-store
|
2021-01-28 02:20:42 +03:00
|
|
|
/updates
|
2021-01-20 00:07:11 +03:00
|
|
|
update:store
|
|
|
|
%contact-update
|
2021-01-28 02:20:42 +03:00
|
|
|
%contact-pull-hook
|
2021-01-20 00:07:11 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ agent (push-hook:push-hook config)
|
|
|
|
--
|
|
|
|
::
|
|
|
|
%- agent:dbug
|
|
|
|
^- agent:gall
|
|
|
|
%- (agent:push-hook config)
|
|
|
|
^- agent
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
|
|
|
con ~(. contact bowl)
|
2021-02-02 00:28:52 +03:00
|
|
|
grp ~(. group bowl)
|
2021-01-20 00:07:11 +03:00
|
|
|
::
|
|
|
|
++ on-init on-init:def
|
|
|
|
++ on-save !>(~)
|
|
|
|
++ on-load on-load:def
|
|
|
|
++ on-poke on-poke:def
|
|
|
|
++ on-agent on-agent:def
|
|
|
|
++ on-watch on-watch:def
|
|
|
|
++ on-leave on-leave:def
|
|
|
|
++ on-peek on-peek:def
|
|
|
|
++ on-arvo on-arvo:def
|
|
|
|
++ on-fail on-fail:def
|
|
|
|
::
|
|
|
|
++ should-proxy-update
|
|
|
|
|= =vase
|
|
|
|
^- ?
|
|
|
|
=/ =update:store !<(update:store vase)
|
|
|
|
?- -.update
|
2021-01-28 02:20:42 +03:00
|
|
|
%initial %.n
|
|
|
|
%add %.y
|
|
|
|
%remove %.y
|
|
|
|
%edit %.y
|
|
|
|
%allow %.n
|
|
|
|
%disallow %.n
|
|
|
|
%set-public %.n
|
2021-01-20 00:07:11 +03:00
|
|
|
==
|
2021-02-02 07:30:12 +03:00
|
|
|
++ resource-for-update resource-for-update:con
|
2021-02-01 23:49:14 +03:00
|
|
|
::
|
2021-01-20 00:07:11 +03:00
|
|
|
++ initial-watch
|
|
|
|
|= [=path =resource:res]
|
|
|
|
^- vase
|
2021-02-02 01:01:23 +03:00
|
|
|
|^
|
2021-01-20 00:07:11 +03:00
|
|
|
?> (is-allowed:con src.bowl)
|
|
|
|
!> ^- update:store
|
2021-02-02 01:01:23 +03:00
|
|
|
[%initial rolo %.n]
|
|
|
|
::
|
|
|
|
++ rolo
|
|
|
|
^- rolodex:store
|
|
|
|
=/ ugroup (scry-group:grp resource)
|
|
|
|
%- ~(gas by *rolodex:store)
|
2021-02-02 03:24:56 +03:00
|
|
|
?~ ugroup
|
|
|
|
=/ c=(unit contact:store) (get-contact:con our.bowl)
|
|
|
|
?~ c
|
|
|
|
[our.bowl *contact:store]~
|
|
|
|
[our.bowl u.c]~
|
2021-02-02 01:01:23 +03:00
|
|
|
%+ murn ~(tap in (members:grp resource))
|
|
|
|
|= s=ship
|
|
|
|
^- (unit [ship contact:store])
|
|
|
|
=/ c=(unit contact:store) (get-contact:con s)
|
|
|
|
?~(c ~ `[s u.c])
|
|
|
|
--
|
2021-01-20 00:07:11 +03:00
|
|
|
::
|
|
|
|
++ take-update
|
|
|
|
|= =vase
|
|
|
|
^- [(list card) agent]
|
|
|
|
=/ =update:store !<(update:store vase)
|
|
|
|
?. ?=(%disallow -.update) [~ this]
|
|
|
|
:_ this
|
|
|
|
[%give %kick ~[resource+(en-path:res [our.bowl %our])] ~]~
|
|
|
|
--
|