mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 18:43:46 +03:00
Merge branch 'develop' into next/kelvin/412
This commit is contained in:
commit
8565fb5f8b
@ -2699,6 +2699,7 @@
|
|||||||
+$ gift :: outgoing result
|
+$ gift :: outgoing result
|
||||||
$% [%boon payload=*] :: ames response
|
$% [%boon payload=*] :: ames response
|
||||||
[%done error=(unit error:ames)] :: ames message (n)ack
|
[%done error=(unit error:ames)] :: ames message (n)ack
|
||||||
|
[%flub ~] :: not ready to handle plea
|
||||||
[%unto p=unto] ::
|
[%unto p=unto] ::
|
||||||
== ::
|
== ::
|
||||||
+$ task :: incoming request
|
+$ task :: incoming request
|
||||||
|
@ -1227,7 +1227,7 @@
|
|||||||
$>(%wake gift:behn)
|
$>(%wake gift:behn)
|
||||||
==
|
==
|
||||||
$: %gall
|
$: %gall
|
||||||
$>(%unto gift:gall)
|
$>(?(%flub %unto) gift:gall)
|
||||||
==
|
==
|
||||||
$: %jael
|
$: %jael
|
||||||
$> $? %private-keys
|
$> $? %private-keys
|
||||||
@ -1279,6 +1279,7 @@
|
|||||||
::
|
::
|
||||||
+$ message-sink-task
|
+$ message-sink-task
|
||||||
$% [%done ok=?]
|
$% [%done ok=?]
|
||||||
|
[%flub ~]
|
||||||
[%drop =message-num]
|
[%drop =message-num]
|
||||||
[%hear =lane =shut-packet ok=?]
|
[%hear =lane =shut-packet ok=?]
|
||||||
==
|
==
|
||||||
@ -1761,6 +1762,31 @@
|
|||||||
+.u.ship-state
|
+.u.ship-state
|
||||||
::
|
::
|
||||||
+| %tasks
|
+| %tasks
|
||||||
|
:: +on-take-flub: vane not ready to process message, pretend it
|
||||||
|
:: was never delivered
|
||||||
|
::
|
||||||
|
++ on-take-flub
|
||||||
|
|= =wire
|
||||||
|
^+ event-core
|
||||||
|
?~ parsed=(parse-bone-wire wire)
|
||||||
|
:: no-op
|
||||||
|
::
|
||||||
|
~> %slog.0^leaf/"ames: dropping malformed wire: {(spud wire)}"
|
||||||
|
event-core
|
||||||
|
?> ?=([@ her=ship *] u.parsed)
|
||||||
|
=* her her.u.parsed
|
||||||
|
=/ peer-core (abed-got:pe her)
|
||||||
|
?: ?& ?=([%new *] u.parsed)
|
||||||
|
(lth rift.u.parsed rift.peer-state.peer-core)
|
||||||
|
==
|
||||||
|
:: ignore events from an old rift
|
||||||
|
::
|
||||||
|
%- %^ ev-trace odd.veb her
|
||||||
|
|.("dropping old rift wire: {(spud wire)}")
|
||||||
|
event-core
|
||||||
|
=/ =bone
|
||||||
|
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
||||||
|
abet:(on-flub:peer-core bone)
|
||||||
:: +on-take-done: handle notice from vane that it processed a message
|
:: +on-take-done: handle notice from vane that it processed a message
|
||||||
::
|
::
|
||||||
++ on-take-done
|
++ on-take-done
|
||||||
@ -3065,6 +3091,11 @@
|
|||||||
:- >[bone=bone message-num=message-num meat=meat]:shut-packet<
|
:- >[bone=bone message-num=message-num meat=meat]:shut-packet<
|
||||||
tang.u.dud
|
tang.u.dud
|
||||||
abet:(call:(abed:mu bone) %hear [message-num +.meat]:shut-packet)
|
abet:(call:(abed:mu bone) %hear [message-num +.meat]:shut-packet)
|
||||||
|
::
|
||||||
|
++ on-flub
|
||||||
|
|= =bone
|
||||||
|
^+ peer-core
|
||||||
|
abet:(call:(abed:mi:peer-core bone) %flub ~)
|
||||||
:: +on-memo: handle request to send message
|
:: +on-memo: handle request to send message
|
||||||
::
|
::
|
||||||
++ on-memo
|
++ on-memo
|
||||||
@ -4001,11 +4032,16 @@
|
|||||||
++ call
|
++ call
|
||||||
|= task=message-sink-task
|
|= task=message-sink-task
|
||||||
^+ sink
|
^+ sink
|
||||||
?- -.task
|
?- -.task
|
||||||
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
||||||
%done (done ok.task)
|
%done (done ok.task)
|
||||||
|
%flub
|
||||||
|
%= sink
|
||||||
|
last-heard.state (dec last-heard.state)
|
||||||
|
pending-vane-ack.state ~(nap to pending-vane-ack.state)
|
||||||
|
==
|
||||||
::
|
::
|
||||||
%hear
|
%hear
|
||||||
|^ ?: ?| corked
|
|^ ?: ?| corked
|
||||||
?& %*(corked sink bone (mix 0b10 bone))
|
?& %*(corked sink bone (mix 0b10 bone))
|
||||||
=(%nack (received bone))
|
=(%nack (received bone))
|
||||||
@ -4855,6 +4891,8 @@
|
|||||||
[@ %boon *] (on-take-boon:event-core wire payload.sign)
|
[@ %boon *] (on-take-boon:event-core wire payload.sign)
|
||||||
::
|
::
|
||||||
[%behn %wake *] (on-take-wake:event-core wire error.sign)
|
[%behn %wake *] (on-take-wake:event-core wire error.sign)
|
||||||
|
::
|
||||||
|
[%gall %flub ~] (on-take-flub:event-core wire)
|
||||||
::
|
::
|
||||||
[%jael %turf *] (on-take-turf:event-core turf.sign)
|
[%jael %turf *] (on-take-turf:event-core turf.sign)
|
||||||
[%jael %private-keys *] (on-priv:event-core [life vein]:sign)
|
[%jael %private-keys *] (on-priv:event-core [life vein]:sign)
|
||||||
|
@ -865,6 +865,14 @@
|
|||||||
=. mo-core (mo-track-ship ship)
|
=. mo-core (mo-track-ship ship)
|
||||||
=? mo-core ?=(%u -.ames-request) (mo-give %done ~)
|
=? mo-core ?=(%u -.ames-request) (mo-give %done ~)
|
||||||
::
|
::
|
||||||
|
=/ yok=(unit yoke) (~(get by yokes.state) agent-name)
|
||||||
|
?~ yok
|
||||||
|
(mo-give %flub ~)
|
||||||
|
?: ?=(%nuke -.u.yok)
|
||||||
|
(mo-give %flub ~)
|
||||||
|
?: ?=(%.n -.agent.u.yok)
|
||||||
|
(mo-give %flub ~)
|
||||||
|
::
|
||||||
=/ =wire /sys/req/(scot %p ship)/[agent-name]
|
=/ =wire /sys/req/(scot %p ship)/[agent-name]
|
||||||
::
|
::
|
||||||
=/ =deal
|
=/ =deal
|
||||||
|
@ -7,7 +7,4 @@
|
|||||||
^- form:m
|
^- form:m
|
||||||
;< =bowl:spider bind:m get-bowl:strandio
|
;< =bowl:spider bind:m get-bowl:strandio
|
||||||
;< code=@p bind:m (scry:strandio @p /j/code/(scot %p our.bowl))
|
;< code=@p bind:m (scry:strandio @p /j/code/(scot %p our.bowl))
|
||||||
%- pure:m
|
(pure:m !>(code))
|
||||||
!> ^- tape
|
|
||||||
%+ slag 1
|
|
||||||
(scow %p code)
|
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
=/ [who=ship message=@t]
|
=/ [who=ship message=@t]
|
||||||
?@(arg [who.arg ''] [who.arg (crip mez.arg)])
|
?@(arg [who.arg ''] [who.arg (crip mez.arg)])
|
||||||
;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message))
|
;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message))
|
||||||
(pure:m !>("hi {<who>} successful"))
|
(pure:m !>((crip "hi {<who>} successful")))
|
||||||
|
@ -14,5 +14,5 @@
|
|||||||
;< =riot:clay bind:m
|
;< =riot:clay bind:m
|
||||||
(warp:strandio ship desk ~ %sing care case target-path)
|
(warp:strandio ship desk ~ %sing care case target-path)
|
||||||
?~ riot
|
?~ riot
|
||||||
(pure:m !>("nothing"))
|
(pure:m !>('nothing'))
|
||||||
(pure:m q.r.u.riot)
|
(pure:m q.r.u.riot)
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
?+ flow=(~(get by sub) which) `0/sub
|
?+ flow=(~(get by sub) which) `0/sub
|
||||||
~ [~[(pine which)] 0/(~(put by sub) which ~)]
|
~ [~[(pine which)] 0/(~(put by sub) which ~)]
|
||||||
[~ ~] [~[(pine which)] 0/sub]
|
[~ ~] [~[(pine which)] 0/sub]
|
||||||
[~ ~ [* %& * *]] [~[(scry `+(aeon.u.u.flow) which)] 0/sub]
|
[~ ~ [* %& * *]] [~[(pine which)] 0/sub]
|
||||||
==
|
==
|
||||||
++ quit (corl (lead %0) ~(del by sub)) :: Unsub from [ship dude path].
|
++ quit (corl (lead %0) ~(del by sub)) :: Unsub from [ship dude path].
|
||||||
++ read :: See current subscribed states.
|
++ read :: See current subscribed states.
|
||||||
@ -95,7 +95,7 @@
|
|||||||
[~ ~ *]
|
[~ ~ *]
|
||||||
=. stale.u.u.flow &
|
=. stale.u.u.flow &
|
||||||
:_ 0/(~(put by sub) current u.flow)
|
:_ 0/(~(put by sub) current u.flow)
|
||||||
~[(on-rock-poke current u.u.flow ~)]
|
~[(on-rock-poke fake=& current u.u.flow ~)]
|
||||||
::
|
::
|
||||||
[~ ~]
|
[~ ~]
|
||||||
:_ 0/(~(del by sub) current) :_ ~
|
:_ 0/(~(del by sub) current) :_ ~
|
||||||
@ -105,77 +105,53 @@
|
|||||||
[path ship dude]:current
|
[path ship dude]:current
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
:: :: Check if we're still interested
|
|
||||||
:: :: in a wave. If no, no-op.
|
|
||||||
:: :: If yes, scry.
|
|
||||||
++ behn :: (See https://gist.github.com/belisarius222/7f8452bfea9b199c0ed717ab1778f35b)
|
|
||||||
|= [ship=term =dude aeon=term path=paths]
|
|
||||||
^- (list card:agent:gall)
|
|
||||||
%- fall :_ ~ %- mole |.
|
|
||||||
=/ ship (slav %p ship)
|
|
||||||
=/ aeon (slav %ud aeon)
|
|
||||||
?: (lte aeon aeon:(fall (~(got by sub) ship dude path) *flow)) ~
|
|
||||||
~[(scry `aeon ship dude path)]
|
|
||||||
::
|
|
||||||
++ apply :: Handle response from publisher.
|
++ apply :: Handle response from publisher.
|
||||||
|= res=(response:poke lake paths)
|
|= res=(response:poke lake paths)
|
||||||
^- (quip card:agent:gall subs)
|
^- (quip card:agent:gall subs)
|
||||||
%- fall :_ `0/sub %- mole |.
|
|
||||||
=* current [src.bowl dude.res path.res]
|
=* current [src.bowl dude.res path.res]
|
||||||
=/ old=flow (fall (~(got by sub) current) *flow)
|
=/ old=flow (fall (~(got by sub) current) *flow)
|
||||||
?- type.res
|
?: ?=(%tomb what.res)
|
||||||
%tomb
|
|
||||||
=/ =flow old(stale &)
|
=/ =flow old(stale &)
|
||||||
:_ 0/(~(put by sub) current `flow) :_ ~
|
:_ 0/(~(put by sub) current `flow) :_ ~
|
||||||
(on-rock-poke current flow ~)
|
(on-rock-poke fake=& current flow ~)
|
||||||
::
|
::
|
||||||
%yore
|
=/ [wave=(unit wave:lake) new=(unit flow)]
|
||||||
:_ 0/sub :_ ~
|
?- what.res
|
||||||
(pine src.bowl dude.res path.res)
|
%rock ?: (lte aeon.res aeon.old) [~ ~]
|
||||||
::
|
[~ `[aeon.res | | rock.res]]
|
||||||
%nigh
|
%wave ?: (lte aeon.res aeon.old) [~ ~]
|
||||||
:_ 0/sub :_ ~
|
?> =(aeon.res +(aeon.old))
|
||||||
(behn-s25 [dude aeon path]:res)
|
[`wave.res `[aeon.res | | (wash:lake rock.old wave.res)]]
|
||||||
::
|
|
||||||
%scry
|
|
||||||
=/ [wave=(unit wave:lake) =flow]
|
|
||||||
?- what.res
|
|
||||||
%rock ?> (gte aeon.res aeon.old)
|
|
||||||
[~ [aeon.res | | rock.res]]
|
|
||||||
%wave ?> =(aeon.res +(aeon.old))
|
|
||||||
[`wave.res [aeon.res | | (wash:lake rock.old wave.res)]]
|
|
||||||
==
|
|
||||||
:_ 0/(~(put by sub) current `flow)
|
|
||||||
:~ (on-rock-poke current flow wave)
|
|
||||||
(scry `+(aeon.res) src.bowl dude.res path.res)
|
|
||||||
==
|
==
|
||||||
==
|
?~ new `0/sub
|
||||||
|
:_ 0/(~(put by sub) current new) :_ ~
|
||||||
|
(on-rock-poke fake=& current u.new wave)
|
||||||
|
::
|
||||||
|
++ handle-fake-on-rock
|
||||||
|
|= =(on-rock:poke lake paths)
|
||||||
|
^- (list card:agent:gall)
|
||||||
|
?~ flow=(~(get by sub) [src from path]:on-rock) ~
|
||||||
|
?~ u.flow ~
|
||||||
|
?. =([stale fail rock]:u.u.flow [stale fail rock]:on-rock) ~
|
||||||
|
~[(on-rock-poke fake=| [src from path]:on-rock u.u.flow wave.on-rock)]
|
||||||
::
|
::
|
||||||
:: Non-public facing arms below
|
:: Non-public facing arms below
|
||||||
::
|
::
|
||||||
++ behn-s25
|
++ pine
|
||||||
|= [=dude =aeon path=noun]
|
|= [who=ship which=dude where=paths]
|
||||||
^- card:agent:gall
|
^- card:agent:gall
|
||||||
:* %pass (zoom behn/(scot %p src.bowl)^dude^(scot %ud aeon)^path)
|
:* %pass (zoom scry-request/(scot %p who)^which^where)
|
||||||
%arvo %b %wait (add ~s25 now.bowl)
|
|
||||||
==
|
|
||||||
++ pine |= [ship dude paths] (scry ~ +<)
|
|
||||||
++ scry
|
|
||||||
|= [when=(unit aeon) who=ship which=dude where=paths]
|
|
||||||
^- card:agent:gall
|
|
||||||
=/ when ?~ when ~ (scot %ud u.when)
|
|
||||||
:* %pass (zoom scry-request/(scot %p who)^which^when^where)
|
|
||||||
%agent [who which]
|
%agent [who which]
|
||||||
%poke %sss-to-pub :- result-type ^- result
|
%poke sss-to-pub/[result-type `result`[where dap.bowl]]
|
||||||
[where dap.bowl ^when]
|
|
||||||
==
|
==
|
||||||
++ on-rock-poke
|
++ on-rock-poke
|
||||||
|= [[=ship =dude path=paths] flow wave=(unit wave:lake)]
|
|= [fake=? [=ship =dude path=paths] flow wave=(unit wave:lake)]
|
||||||
^- card:agent:gall
|
^- card:agent:gall
|
||||||
:* %pass (zoom on-rock/(scot %ud aeon)^(scot %p ship)^dude^path)
|
:* %pass %+ zoom ?:(fake %fake %on-rock)
|
||||||
|
(scot %ud aeon)^(scot %p ship)^dude^path
|
||||||
%agent [our dap]:bowl
|
%agent [our dap]:bowl
|
||||||
%poke %sss-on-rock on-rock-type ^- from
|
%poke ?:(fake %sss-fake-on-rock %sss-on-rock)
|
||||||
[path ship dude stale fail rock wave]
|
on-rock-type `from`[path ship dude stale fail rock wave]
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
++ du :: Manage publications.
|
++ du :: Manage publications.
|
||||||
@ -184,28 +160,78 @@
|
|||||||
|%
|
|%
|
||||||
+$ into (request:poke paths)
|
+$ into (request:poke paths)
|
||||||
+$ result (response:poke lake paths)
|
+$ result (response:poke lake paths)
|
||||||
+$ rule [rocks=_1 waves=_5] :: Retention policy
|
+$ rule $~ [`5 5]
|
||||||
|
[horizon=(unit @ud) frequency=@ud] :: Retention policy
|
||||||
+$ tide
|
+$ tide
|
||||||
$: rok=((mop aeon rock:lake) gte)
|
$: rok=((mop aeon rock:lake) gte)
|
||||||
wav=((mop aeon wave:lake) lte)
|
wav=((mop aeon wave:lake) lte)
|
||||||
rul=rule
|
rul=rule
|
||||||
mem=(mip ship dude @da)
|
mem=(jug ship dude)
|
||||||
==
|
==
|
||||||
+$ buoy
|
+$ buoy
|
||||||
$: tid=$~(*tide $@(aeon tide))
|
$: tid=$~(*tide $@(aeon tide))
|
||||||
alo=(unit (set ship))
|
alo=(unit (set ship))
|
||||||
==
|
==
|
||||||
+$ pubs [%0 (map paths buoy)]
|
++ pubs
|
||||||
|
=< $>(%1 versioned)
|
||||||
|
|%
|
||||||
|
++ update
|
||||||
|
|= =versioned
|
||||||
|
^- pubs
|
||||||
|
?- -.versioned
|
||||||
|
%1 versioned
|
||||||
|
%0
|
||||||
|
:- %1
|
||||||
|
%- ~(run by +.versioned)
|
||||||
|
|= =buoy-0:^versioned
|
||||||
|
^- buoy
|
||||||
|
%= buoy-0
|
||||||
|
tid
|
||||||
|
?@ tid.buoy-0 tid.buoy-0
|
||||||
|
^- tide
|
||||||
|
%= tid.buoy-0
|
||||||
|
rocks.rul
|
||||||
|
?: =(waves.rul.tid.buoy-0 0) ~
|
||||||
|
`(mul [+(rocks) waves]:rul.tid.buoy-0)
|
||||||
|
::
|
||||||
|
mem
|
||||||
|
^- (jug ship dude)
|
||||||
|
%- ~(run by mem.tid.buoy-0)
|
||||||
|
|= =(map dude @da)
|
||||||
|
^- (set dude)
|
||||||
|
~(key by map)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
==
|
||||||
|
++ versioned
|
||||||
|
=< $% [%0 (map paths buoy-0)]
|
||||||
|
[%1 (map paths buoy)]
|
||||||
|
==
|
||||||
|
|%
|
||||||
|
+$ buoy-0
|
||||||
|
$: tid=$~(*tide-0 $@(aeon tide-0))
|
||||||
|
alo=(unit (set ship))
|
||||||
|
==
|
||||||
|
+$ tide-0
|
||||||
|
$: rok=((mop aeon rock:lake) gte)
|
||||||
|
wav=((mop aeon wave:lake) lte)
|
||||||
|
rul=[rocks=@ud waves=@ud]
|
||||||
|
mem=(mip ship dude @da)
|
||||||
|
==
|
||||||
|
--
|
||||||
|
--
|
||||||
--
|
--
|
||||||
|= [pub=pubs =bowl:gall result-type=type]
|
|= [pub=versioned:pubs =bowl:gall result-type=type]
|
||||||
=> .(pub +.pub)
|
=> .(pub +:(update:pubs pub))
|
||||||
=* rok ((on aeon rock:lake) gte)
|
=* rok ((on aeon rock:lake) gte)
|
||||||
=* wav ((on aeon wave:lake) lte)
|
=* wav ((on aeon wave:lake) lte)
|
||||||
|%
|
|%
|
||||||
++ rule :: Set new retention policy.
|
++ rule :: Set new retention policy.
|
||||||
|= [path=paths =^rule]
|
|= [path=paths =^rule]
|
||||||
^- pubs
|
^- pubs
|
||||||
:- %0
|
:- %1
|
||||||
|
%- fall :_ (~(put by pub) path %*(. *$<(aeon buoy) rul.tid rule))
|
||||||
|
%- mole |.
|
||||||
%+ ~(jab by pub) path
|
%+ ~(jab by pub) path
|
||||||
|= =buoy
|
|= =buoy
|
||||||
?@ tid.buoy buoy
|
?@ tid.buoy buoy
|
||||||
@ -214,11 +240,11 @@
|
|||||||
++ wipe :: Create new rock and wipe rest.
|
++ wipe :: Create new rock and wipe rest.
|
||||||
|= path=paths
|
|= path=paths
|
||||||
^- pubs
|
^- pubs
|
||||||
:- %0
|
:- %1
|
||||||
%+ ~(jab by pub) path
|
%+ ~(jab by pub) path
|
||||||
|= =buoy
|
|= =buoy
|
||||||
?@ tid.buoy buoy
|
?@ tid.buoy buoy
|
||||||
%* . buoy(tid (form tid.buoy(rul [0 1])))
|
%* . buoy(tid (form tid.buoy(rul [`0 1])))
|
||||||
rul.tid rul.tid.buoy
|
rul.tid rul.tid.buoy
|
||||||
wav.tid ~
|
wav.tid ~
|
||||||
==
|
==
|
||||||
@ -232,29 +258,31 @@
|
|||||||
?> ?=(^ tid.buoy)
|
?> ?=(^ tid.buoy)
|
||||||
=* tide tid.buoy
|
=* tide tid.buoy
|
||||||
=/ next=aeon +((latest tide))
|
=/ next=aeon +((latest tide))
|
||||||
:- %+ murn ~(tap bi mem.tide)
|
:- %- zing
|
||||||
|= [=ship =dude =@da]
|
%+ turn ~(tap by mem.tide)
|
||||||
?: (lth da now.bowl) ~
|
|= [=ship =(set dude)]
|
||||||
`(send scry/wave/wave ship dude next path)
|
%+ turn ~(tap in set)
|
||||||
:- %0
|
|= =dude
|
||||||
|
(send wave/[next wave] ship dude path)
|
||||||
|
:- %1
|
||||||
%+ ~(put by pub) path
|
%+ ~(put by pub) path
|
||||||
=/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
=/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
||||||
=. wav.tide (put:wav wav.tide next wave)
|
=. wav.tide (put:wav wav.tide next wave)
|
||||||
=. mem.tide ~
|
=. mem.tide ~
|
||||||
?. =(next (add aeon.last waves.rul.tide)) buoy
|
?. =(next (add aeon.last frequency.rul.tide)) buoy
|
||||||
buoy(tid (form tide))
|
buoy(tid (form tide))
|
||||||
::
|
::
|
||||||
++ fork :: Fork a pub into an empty path.
|
++ fork :: Fork a pub into an empty path.
|
||||||
|= [from=paths to=paths]
|
|= [from=paths to=paths]
|
||||||
^- pubs
|
^- pubs
|
||||||
:- %0
|
:- %1
|
||||||
?< (~(has by pub) to)
|
?< (~(has by pub) to)
|
||||||
(~(put by pub) to (~(got by pub) from))
|
(~(put by pub) to (~(got by pub) from))
|
||||||
::
|
::
|
||||||
++ copy :: Fork a sub into an empty path.
|
++ copy :: Fork a sub into an empty path.
|
||||||
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
|
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
|
||||||
^- pubs
|
^- pubs
|
||||||
:- %0
|
:- %1
|
||||||
?< (~(has by pub) to)
|
?< (~(has by pub) to)
|
||||||
%+ ~(put by pub) to
|
%+ ~(put by pub) to
|
||||||
%* . *$<(aeon buoy)
|
%* . *$<(aeon buoy)
|
||||||
@ -263,7 +291,7 @@
|
|||||||
::
|
::
|
||||||
++ perm :: Change permissions with gate.
|
++ perm :: Change permissions with gate.
|
||||||
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
|
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
|
||||||
^- pubs
|
^- (quip card:agent:gall pubs)
|
||||||
%+ edit where
|
%+ edit where
|
||||||
|= =buoy
|
|= =buoy
|
||||||
=/ new=_alo.buoy (diff alo.buoy)
|
=/ new=_alo.buoy (diff alo.buoy)
|
||||||
@ -272,21 +300,21 @@
|
|||||||
alo new
|
alo new
|
||||||
mem.tid ?~ new mem.tid.buoy
|
mem.tid ?~ new mem.tid.buoy
|
||||||
%. mem.tid.buoy
|
%. mem.tid.buoy
|
||||||
~(int by (malt (turn ~(tap in u.new) (late *(map @ @)))))
|
~(int by (malt (turn ~(tap in u.new) (late *(set @)))))
|
||||||
==
|
==
|
||||||
++ public (curr perm _~) :: Make list of paths public.
|
++ public (curr perm _~) :: Make list of paths public.
|
||||||
++ secret (curr perm _`~) :: Make list of paths secret.
|
++ secret (curr perm _`~) :: Make list of paths secret.
|
||||||
:: :: Block ships from paths.
|
:: :: Block ships from paths.
|
||||||
++ block :: No-ops on public paths.
|
++ block :: No-ops on public paths.
|
||||||
|= [who=(list ship) whence=(list paths)]
|
|= [who=(list ship) whence=(list paths)]
|
||||||
^- pubs
|
^- (quip card:agent:gall pubs)
|
||||||
%+ perm whence
|
%+ perm whence
|
||||||
|= old=(unit (set ship))
|
|= old=(unit (set ship))
|
||||||
?~ old ~ `(~(dif in u.old) (sy who))
|
?~ old ~ `(~(dif in u.old) (sy who))
|
||||||
:: :: Allow ships to paths.
|
:: :: Allow ships to paths.
|
||||||
++ allow :: Any public paths will no-op.
|
++ allow :: Any public paths will no-op.
|
||||||
|= [who=(list ship) where=(list paths)]
|
|= [who=(list ship) where=(list paths)]
|
||||||
^- pubs
|
^- (quip card:agent:gall pubs)
|
||||||
%+ perm where
|
%+ perm where
|
||||||
|= old=(unit (set ship))
|
|= old=(unit (set ship))
|
||||||
?~ old ~ `(~(gas in u.old) who)
|
?~ old ~ `(~(gas in u.old) who)
|
||||||
@ -313,37 +341,51 @@
|
|||||||
=/ =buoy (~(gut by pub) path.req *buoy)
|
=/ =buoy (~(gut by pub) path.req *buoy)
|
||||||
?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
|
?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
|
||||||
?@ tid.buoy
|
?@ tid.buoy
|
||||||
:_ 0/pub :_ ~
|
:_ 1/pub :_ ~
|
||||||
(send tomb/~ src.bowl dude.req tid.buoy path.req)
|
(send tomb/~ src.bowl dude.req path.req)
|
||||||
?~ when.req
|
:_ 1/pub :_ ~
|
||||||
=/ last (fall (pry:rok rok.tid.buoy) *[=key =val]:rok)
|
=/ last (fall (pry:rok rok.tid.buoy) *[=key =val]:rok)
|
||||||
:_ 0/pub :_ ~
|
(send rock/last src.bowl dude.req path.req)
|
||||||
(send scry/rock/val.last src.bowl dude.req key.last path.req)
|
::
|
||||||
?^ dat=(get:wav wav.tid.buoy u.when.req)
|
++ tell
|
||||||
:_ 0/pub :_ ~
|
|= [[ship=term =dude aeon=term path=paths] =sign:agent:gall]
|
||||||
(send scry/wave/u.dat src.bowl [dude u.when path]:req)
|
^- (quip card:agent:gall pubs)
|
||||||
?: %+ lte u.when.req
|
?> ?=(%poke-ack -.sign)
|
||||||
key::(fall (ram:wav wav.tid.buoy) (pry:rok rok.tid.buoy) [=key val]:wav)
|
?^ p.sign `1/pub
|
||||||
:_ 0/pub :_ ~
|
=/ =buoy (~(gut by pub) path *buoy)
|
||||||
(send yore/~ src.bowl [dude u.when path]:req)
|
?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
|
||||||
?> =(u.when.req +((latest tid.buoy)))
|
?@ tid.buoy
|
||||||
:- ~[(send nigh/~ src.bowl [dude u.when path]:req)]
|
:_ 1/pub :_ ~
|
||||||
:- %0
|
(send tomb/~ src.bowl dude path)
|
||||||
%+ ~(put by pub) path.req
|
::
|
||||||
|
=> .(aeon +((slav %ud aeon)))
|
||||||
|
?^ dat=(get:wav wav.tid.buoy aeon)
|
||||||
|
:_ 1/pub :_ ~
|
||||||
|
(send wave/[aeon u.dat] src.bowl dude path)
|
||||||
|
=/ last (fall (pry:rok rok.tid.buoy) [=key =val]:rok)
|
||||||
|
?: (lte aeon key.last)
|
||||||
|
:_ 1/pub :_ ~
|
||||||
|
(send rock/last src.bowl dude path)
|
||||||
|
:- ~
|
||||||
|
:- %1
|
||||||
|
%+ ~(put by pub) path
|
||||||
%= buoy
|
%= buoy
|
||||||
mem.tid (~(put bi mem.tid.buoy) src.bowl dude.req (add ~s25 now.bowl))
|
mem.tid (~(put ju mem.tid.buoy) src.bowl dude)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Non-public facing arms below
|
:: Non-public facing arms below
|
||||||
::
|
::
|
||||||
++ send
|
++ send
|
||||||
|= [payload=_|3:*(response:poke lake paths) =ship =dude =aeon path=paths]
|
|= [payload=_|2:*(response:poke lake paths) =ship =dude path=paths]
|
||||||
^- card:agent:gall
|
^- card:agent:gall
|
||||||
=* mark (cat 3 %sss- name:lake)
|
=* mark (cat 3 %sss- name:lake)
|
||||||
:* %pass (zoom scry-response/(scot %p ship)^dude^(scot %ud aeon)^path)
|
=/ callback=^path
|
||||||
|
?: ?=(%tomb what.payload) (zoom tomb-response/(scot %p ship)^dude^path)
|
||||||
|
(zoom scry-response/(scot %p ship)^dude^(scot %ud aeon.payload)^path)
|
||||||
|
:* %pass callback
|
||||||
%agent [ship dude]
|
%agent [ship dude]
|
||||||
%poke mark result-type ^- (response:poke lake paths)
|
%poke mark result-type ^- (response:poke lake paths)
|
||||||
[path dap.bowl aeon payload]
|
[path dap.bowl payload]
|
||||||
==
|
==
|
||||||
++ latest
|
++ latest
|
||||||
|= =$@(aeon tide)
|
|= =$@(aeon tide)
|
||||||
@ -354,31 +396,49 @@
|
|||||||
::
|
::
|
||||||
++ edit
|
++ edit
|
||||||
|= [ps=(list paths) edit=$-(buoy buoy)]
|
|= [ps=(list paths) edit=$-(buoy buoy)]
|
||||||
^- pubs
|
^- (quip card:agent:gall pubs)
|
||||||
:- %0
|
|
||||||
%- ~(rep in (sy ps))
|
%- ~(rep in (sy ps))
|
||||||
|= [path=paths =_pub]
|
|= [path=paths caz=(list card:agent:gall) %1 =_pub]
|
||||||
%- fall :_ pub %- mole |.
|
?~ old=(~(get by pub) path) [caz 1/pub]
|
||||||
(~(jab by pub) path edit)
|
=/ new=buoy (edit u.old)
|
||||||
|
:_ 1/(~(put by pub) path new)
|
||||||
|
%- weld :_ caz
|
||||||
|
^- (list card:agent:gall)
|
||||||
|
?@ tid.u.old ~
|
||||||
|
?@ tid.new
|
||||||
|
%- zing
|
||||||
|
%+ turn ~(tap by mem.tid.u.old)
|
||||||
|
|= [=ship =(set dude)]
|
||||||
|
(turn ~(tap in set) |=(=dude (send tomb/~ ship dude path)))
|
||||||
|
?~ alo.new ~
|
||||||
|
=/ new-alo=(jug ship dude)
|
||||||
|
(malt (turn ~(tap in u.alo.new) (late *(set @))))
|
||||||
|
%- zing
|
||||||
|
%+ turn ~(tap by (~(dif by mem.tid.u.old) new-alo))
|
||||||
|
|= [=ship =(set dude)]
|
||||||
|
(turn ~(tap in set) |=(=dude (send tomb/~ ship dude path)))
|
||||||
::
|
::
|
||||||
++ form
|
++ form
|
||||||
|= =tide
|
|= =tide
|
||||||
^+ tide
|
^+ tide
|
||||||
=/ max-rock=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
=/ max-rock=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
||||||
=/ max-wave (fall (bind (ram:wav wav.tide) head) 0)
|
=/ max-wave (fall (bind (ram:wav wav.tide) head) 0)
|
||||||
=. rok.tide
|
=? rok.tide :: Create new rock.
|
||||||
%+ gas:rok +<-:gas:rok
|
?& !=(frequency.rul.tide 0)
|
||||||
%- tab:rok :_ [~ +(rocks.rul.tide)]
|
(gte max-wave (add aeon.max-rock frequency.rul.tide))
|
||||||
?: ?| =(waves.rul.tide 0)
|
==
|
||||||
(lth max-wave (add aeon.max-rock waves.rul.tide))
|
|
||||||
==
|
|
||||||
rok.tide
|
|
||||||
%+ put:rok rok.tide
|
%+ put:rok rok.tide
|
||||||
%+ roll (tab:wav wav.tide `aeon.max-rock max-wave)
|
%+ roll (tab:wav wav.tide `aeon.max-rock max-wave)
|
||||||
|: [*[now=aeon =wave:lake] `[prev=aeon =rock:lake]`max-rock]
|
|: [*[now=aeon =wave:lake] `[prev=aeon =rock:lake]`max-rock]
|
||||||
~| %aeon-awry
|
~| %aeon-awry
|
||||||
?> =(now +(prev))
|
?> =(now +(prev))
|
||||||
[now (wash:lake rock wave)]
|
[now (wash:lake rock wave)]
|
||||||
|
=. rok.tide
|
||||||
|
?~ horizon.rul.tide :: Only keep genesis and latest.
|
||||||
|
(gas:rok ~ (murn ~[(ram:rok rok.tide) (pry:rok rok.tide)] same))
|
||||||
|
%^ lot:rok rok.tide :: Delete beyond horizon.
|
||||||
|
~
|
||||||
|
(mole |.((sub max-wave (max [u.horizon frequency]:rul.tide))))
|
||||||
~| %rock-zero
|
~| %rock-zero
|
||||||
tide(wav (lot:wav wav.tide (bind (ram:rok rok.tide) |=([r=@ *] (dec r))) ~))
|
tide(wav (lot:wav wav.tide (bind (ram:rok rok.tide) |=([r=@ *] (dec r))) ~))
|
||||||
--
|
--
|
||||||
|
@ -581,8 +581,9 @@
|
|||||||
++ check-for-file
|
++ check-for-file
|
||||||
|= [[=ship =desk =case] =spur]
|
|= [[=ship =desk =case] =spur]
|
||||||
=/ m (strand ,?)
|
=/ m (strand ,?)
|
||||||
;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
|
;< =riot:clay bind:m (warp ship desk ~ %sing %u case spur)
|
||||||
(pure:m ?=(^ riot))
|
?> ?=(^ riot)
|
||||||
|
(pure:m !<(? q.r.u.riot))
|
||||||
::
|
::
|
||||||
++ list-tree
|
++ list-tree
|
||||||
|= [[=ship =desk =case] =spur]
|
|= [[=ship =desk =case] =spur]
|
||||||
|
@ -10,25 +10,21 @@
|
|||||||
--
|
--
|
||||||
+$ aeon @ud
|
+$ aeon @ud
|
||||||
+$ dude dude:agent:gall
|
+$ dude dude:agent:gall
|
||||||
+$ what ?(%rock %wave)
|
|
||||||
++ poke
|
++ poke
|
||||||
|%
|
|%
|
||||||
++ request
|
++ request
|
||||||
|* paths=mold
|
|* paths=mold
|
||||||
$: path=paths
|
$: path=paths
|
||||||
=dude
|
=dude
|
||||||
when=(unit aeon)
|
|
||||||
==
|
==
|
||||||
++ response
|
++ response
|
||||||
|* [=(lake) paths=mold]
|
|* [=(lake) paths=mold]
|
||||||
$: path=paths
|
$: path=paths
|
||||||
=dude
|
=dude
|
||||||
=aeon
|
$% [what=%tomb ~]
|
||||||
$% [type=?(%nigh %yore %tomb) ~]
|
[what=%rock =aeon =rock:lake]
|
||||||
$: type=%scry
|
[what=%wave =aeon =wave:lake]
|
||||||
$% [what=%rock =rock:lake]
|
== ==
|
||||||
[what=%wave =wave:lake]
|
|
||||||
== == == ==
|
|
||||||
++ on-rock
|
++ on-rock
|
||||||
|* [=(lake) paths=mold]
|
|* [=(lake) paths=mold]
|
||||||
$: path=paths
|
$: path=paths
|
||||||
|
21
sh/release
21
sh/release
@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Usage: release
|
|
||||||
|
|
||||||
# Create a static tarball under ./release named with the current git revision.
|
|
||||||
|
|
||||||
set -xeuo pipefail
|
|
||||||
|
|
||||||
cd "${0%/*}/.."
|
|
||||||
|
|
||||||
rev="$(git rev-parse HEAD)"
|
|
||||||
sha="${rev:0:5}"
|
|
||||||
ver="$(cat pkg/urbit/version)"
|
|
||||||
tgz="release/urbit-v${ver}-${sha}.tar.gz"
|
|
||||||
out="$(nix-build -A tarball --arg enableStatic true --no-out-link)"
|
|
||||||
|
|
||||||
mkdir -p release
|
|
||||||
|
|
||||||
cp -f "$out" "$tgz"
|
|
||||||
|
|
||||||
chmod 0644 "$tgz"
|
|
Loading…
Reference in New Issue
Block a user