2021-01-20 00:07:11 +03:00
|
|
|
/- *resource
|
|
|
|
/+ store=contact-store, contact, default-agent, verb, dbug, pull-hook
|
|
|
|
~% %contact-pull-hook-top ..part ~
|
|
|
|
|%
|
|
|
|
+$ card card:agent:gall
|
|
|
|
++ config
|
|
|
|
^- config:pull-hook
|
|
|
|
:* %contact-store
|
|
|
|
update:store
|
|
|
|
%contact-update
|
|
|
|
%contact-push-hook
|
2021-02-02 07:30:12 +03:00
|
|
|
%.y :: necessary to enable p2p
|
2021-01-20 00:07:11 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
::
|
|
|
|
%- agent:dbug
|
2021-02-03 22:08:53 +03:00
|
|
|
%+ verb |
|
2021-01-20 00:07:11 +03:00
|
|
|
^- agent:gall
|
|
|
|
%- (agent:pull-hook config)
|
|
|
|
^- (pull-hook:pull-hook config)
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
|
|
|
dep ~(. (default:pull-hook this config) bowl)
|
|
|
|
con ~(. contact bowl)
|
|
|
|
::
|
|
|
|
++ on-init on-init:def
|
|
|
|
++ on-save !>(~)
|
|
|
|
++ on-load on-load:def
|
|
|
|
++ on-poke on-poke:def
|
|
|
|
++ on-peek on-peek:def
|
|
|
|
++ on-arvo on-arvo:def
|
|
|
|
++ on-fail on-fail:def
|
|
|
|
++ on-agent on-agent:def
|
2021-02-03 10:26:41 +03:00
|
|
|
++ on-watch
|
|
|
|
|= =path
|
|
|
|
?. ?=([%nacks ~] path)
|
|
|
|
(on-watch:def path)
|
|
|
|
?> (team:title [src our]:bowl)
|
|
|
|
`this
|
|
|
|
::
|
2021-01-20 00:07:11 +03:00
|
|
|
++ on-leave on-leave:def
|
2021-02-02 07:30:12 +03:00
|
|
|
++ resource-for-update resource-for-update:con
|
2021-01-20 00:07:11 +03:00
|
|
|
++ on-pull-nack
|
|
|
|
|= [=resource =tang]
|
|
|
|
^- (quip card _this)
|
2021-02-03 10:26:41 +03:00
|
|
|
:_ this
|
|
|
|
[%give %fact ~[/nacks] resource+!>(resource)]~
|
2021-01-20 00:07:11 +03:00
|
|
|
::
|
|
|
|
++ on-pull-kick |=(=resource `/)
|
|
|
|
--
|