mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 13:37:36 +03:00
gall: fix scry bug
This commit is contained in:
parent
5231031b60
commit
d7215321d3
@ -621,7 +621,7 @@
|
|||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
::
|
::
|
||||||
=/ app (ap-abed:ap dap routes)
|
=/ app (ap-abed:ap dap routes)
|
||||||
(ap-peek:app care dap path)
|
(ap-peek:app care path)
|
||||||
:: +mo-apply: apply the supplied action to the specified agent.
|
:: +mo-apply: apply the supplied action to the specified agent.
|
||||||
::
|
::
|
||||||
++ mo-apply
|
++ mo-apply
|
||||||
@ -801,18 +801,18 @@
|
|||||||
::
|
::
|
||||||
++ ap-abed
|
++ ap-abed
|
||||||
~/ %ap-abed
|
~/ %ap-abed
|
||||||
|= [=term =routes]
|
|= [dap=term =routes]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
::
|
||||||
=/ =yoke
|
=/ =yoke
|
||||||
=/ running (~(got by yokes.state) term)
|
=/ running (~(got by yokes.state) dap)
|
||||||
=/ =stats
|
=/ =stats
|
||||||
:+ +(change.stats.running)
|
:+ +(change.stats.running)
|
||||||
(shaz (mix (add term change.stats.running) eny))
|
(shaz (mix (add dap change.stats.running) eny))
|
||||||
now
|
now
|
||||||
running(stats stats)
|
running(stats stats)
|
||||||
::
|
::
|
||||||
=. agent-name term
|
=. agent-name dap
|
||||||
=. agent-routes routes
|
=. agent-routes routes
|
||||||
=. current-agent yoke
|
=. current-agent yoke
|
||||||
=. agent-duct hen
|
=. agent-duct hen
|
||||||
@ -987,7 +987,6 @@
|
|||||||
++ ap-apply
|
++ ap-apply
|
||||||
|= =deal
|
|= =deal
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
?- -.deal
|
?- -.deal
|
||||||
%watch-as (ap-subscribe-as +.deal)
|
%watch-as (ap-subscribe-as +.deal)
|
||||||
%poke (ap-poke +.deal)
|
%poke (ap-poke +.deal)
|
||||||
@ -1000,23 +999,13 @@
|
|||||||
::
|
::
|
||||||
++ ap-peek
|
++ ap-peek
|
||||||
~/ %ap-peek
|
~/ %ap-peek
|
||||||
|= [=term tyl=path]
|
|= [care=term tyl=path]
|
||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
|
:: strip trailing mark off path for %x scrys
|
||||||
::
|
::
|
||||||
=/ marked
|
=? tyl ?=(%x care) (flop (tail (flop tyl)))
|
||||||
?. ?=(%x term)
|
|
||||||
[mark=%$ tyl=tyl]
|
|
||||||
::
|
|
||||||
=/ =path (flop tyl)
|
|
||||||
?> ?=(^ path)
|
|
||||||
[mark=i.path tyl=(flop t.path)]
|
|
||||||
::
|
|
||||||
=/ =mark mark.marked
|
|
||||||
=/ tyl tyl.marked
|
|
||||||
::
|
|
||||||
=/ peek-result=(each (unit (unit cage)) tang)
|
=/ peek-result=(each (unit (unit cage)) tang)
|
||||||
(ap-mule-peek |.((on-peek:ap-agent-core [term tyl])))
|
(ap-mule-peek |.((on-peek:ap-agent-core [care tyl])))
|
||||||
::
|
|
||||||
?- -.peek-result
|
?- -.peek-result
|
||||||
%& p.peek-result
|
%& p.peek-result
|
||||||
%| ((slog leaf+"peek bad result" p.peek-result) [~ ~])
|
%| ((slog leaf+"peek bad result" p.peek-result) [~ ~])
|
||||||
@ -1027,7 +1016,6 @@
|
|||||||
~/ %ap-update-subscription
|
~/ %ap-update-subscription
|
||||||
|= [is-ok=? =other=ship other-agent=term =wire]
|
|= [is-ok=? =other=ship other-agent=term =wire]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
?: is-ok
|
?: is-ok
|
||||||
ap-core
|
ap-core
|
||||||
(ap-kill-down wire [other-ship other-agent])
|
(ap-kill-down wire [other-ship other-agent])
|
||||||
@ -1036,7 +1024,6 @@
|
|||||||
++ ap-give
|
++ ap-give
|
||||||
|= =gift:agent
|
|= =gift:agent
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=/ internal-moves
|
=/ internal-moves
|
||||||
(weld (ap-from-internal %give gift) agent-moves)
|
(weld (ap-from-internal %give gift) agent-moves)
|
||||||
ap-core(agent-moves internal-moves)
|
ap-core(agent-moves internal-moves)
|
||||||
@ -1061,7 +1048,6 @@
|
|||||||
++ ap-pass
|
++ ap-pass
|
||||||
|= [=path =neat]
|
|= [=path =neat]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=/ internal-moves
|
=/ internal-moves
|
||||||
(ap-from-internal %pass path neat)
|
(ap-from-internal %pass path neat)
|
||||||
ap-core(agent-moves (weld internal-moves agent-moves))
|
ap-core(agent-moves (weld internal-moves agent-moves))
|
||||||
@ -1071,7 +1057,6 @@
|
|||||||
~/ %ap-reinstall
|
~/ %ap-reinstall
|
||||||
|= =agent
|
|= =agent
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=/ old-state=vase ~(on-save agent.current-agent ap-construct-bowl)
|
=/ old-state=vase ~(on-save agent.current-agent ap-construct-bowl)
|
||||||
=^ error ap-core
|
=^ error ap-core
|
||||||
(ap-install(agent.current-agent agent) `old-state)
|
(ap-install(agent.current-agent agent) `old-state)
|
||||||
@ -1083,7 +1068,6 @@
|
|||||||
++ ap-subscribe-as
|
++ ap-subscribe-as
|
||||||
|= [=mark =path]
|
|= [=mark =path]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=. marks.current-agent (~(put by marks.current-agent) agent-duct mark)
|
=. marks.current-agent (~(put by marks.current-agent) agent-duct mark)
|
||||||
(ap-subscribe path)
|
(ap-subscribe path)
|
||||||
:: +ap-subscribe: apply %watch.
|
:: +ap-subscribe: apply %watch.
|
||||||
@ -1092,11 +1076,9 @@
|
|||||||
~/ %ap-subscribe
|
~/ %ap-subscribe
|
||||||
|= pax=path
|
|= pax=path
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=/ incoming [attributing.agent-routes pax]
|
=/ incoming [attributing.agent-routes pax]
|
||||||
=. inbound.watches.current-agent
|
=. inbound.watches.current-agent
|
||||||
(~(put by inbound.watches.current-agent) agent-duct incoming)
|
(~(put by inbound.watches.current-agent) agent-duct incoming)
|
||||||
::
|
|
||||||
=^ maybe-tang ap-core
|
=^ maybe-tang ap-core
|
||||||
%+ ap-ingest %watch-ack |.
|
%+ ap-ingest %watch-ack |.
|
||||||
(on-watch:ap-agent-core pax)
|
(on-watch:ap-agent-core pax)
|
||||||
@ -1109,7 +1091,6 @@
|
|||||||
~/ %ap-poke
|
~/ %ap-poke
|
||||||
|= =cage
|
|= =cage
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=^ maybe-tang ap-core
|
=^ maybe-tang ap-core
|
||||||
%+ ap-ingest %poke-ack |.
|
%+ ap-ingest %poke-ack |.
|
||||||
(on-poke:ap-agent-core cage)
|
(on-poke:ap-agent-core cage)
|
||||||
@ -1119,7 +1100,6 @@
|
|||||||
++ ap-error
|
++ ap-error
|
||||||
|= [=term =tang]
|
|= [=term =tang]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=/ form |=(=tank [%rose [~ "! " ~] tank ~])
|
=/ form |=(=tank [%rose [~ "! " ~] tank ~])
|
||||||
=^ maybe-tang ap-core
|
=^ maybe-tang ap-core
|
||||||
%+ ap-ingest ~ |.
|
%+ ap-ingest ~ |.
|
||||||
@ -1131,7 +1111,6 @@
|
|||||||
~/ %ap-generic-take
|
~/ %ap-generic-take
|
||||||
|= [=wire =sign-arvo]
|
|= [=wire =sign-arvo]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
=^ maybe-tang ap-core
|
=^ maybe-tang ap-core
|
||||||
%+ ap-ingest ~ |.
|
%+ ap-ingest ~ |.
|
||||||
(on-arvo:ap-agent-core wire sign-arvo)
|
(on-arvo:ap-agent-core wire sign-arvo)
|
||||||
@ -1143,7 +1122,6 @@
|
|||||||
++ ap-specific-take
|
++ ap-specific-take
|
||||||
|= [=wire =sign:agent]
|
|= [=wire =sign:agent]
|
||||||
^+ ap-core
|
^+ ap-core
|
||||||
::
|
|
||||||
~| wire=wire
|
~| wire=wire
|
||||||
?> ?=([%out @ @ *] wire)
|
?> ?=([%out @ @ *] wire)
|
||||||
=/ other-ship (slav %p i.t.wire)
|
=/ other-ship (slav %p i.t.wire)
|
||||||
|
Loading…
Reference in New Issue
Block a user