mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 00:12:28 +03:00
kiln: wip
This commit is contained in:
parent
9a4d754429
commit
fa569cf7f3
@ -278,7 +278,7 @@
|
|||||||
:: restart %eth-watcher
|
:: restart %eth-watcher
|
||||||
::
|
::
|
||||||
~& >> %starting-eth-watcher
|
~& >> %starting-eth-watcher
|
||||||
=/ rein=[desk rein] [%base %.y [%eth-watcher ~ ~] ~]
|
=/ rein=[desk rein] [%base [%eth-watcher %&] ~ ~]
|
||||||
:_ cards
|
:_ cards
|
||||||
[%pass /rein %agent [our.bowl %hood] %poke kiln-rein+!>(rein)]
|
[%pass /rein %agent [our.bowl %hood] %poke kiln-rein+!>(rein)]
|
||||||
=? cards !installed
|
=? cards !installed
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
+$ state-0 [%0 pith-0]
|
+$ state-0 [%0 pith-0]
|
||||||
+$ any-state
|
+$ any-state
|
||||||
$~ *state
|
$~ *state
|
||||||
$% state-9
|
$% state-10
|
||||||
|
state-9
|
||||||
state-8
|
state-8
|
||||||
state-7
|
state-7
|
||||||
state-6
|
state-6
|
||||||
@ -32,7 +33,7 @@
|
|||||||
::
|
::
|
||||||
+$ pith-10
|
+$ pith-10
|
||||||
$: rem=(map desk per-desk) ::
|
$: rem=(map desk per-desk) ::
|
||||||
syn=(map kiln-sync let=@ud) ::
|
syn=(map kiln-sync [let=@ud nex=(unit desk)]) ::
|
||||||
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
||||||
:: map desk to the currently ongoing fuse request
|
:: map desk to the currently ongoing fuse request
|
||||||
:: and the latest version numbers for beaks to
|
:: and the latest version numbers for beaks to
|
||||||
@ -60,12 +61,24 @@
|
|||||||
hxs=(map desk @ud)
|
hxs=(map desk @ud)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
:: $rein-9: diff from desk manifest
|
||||||
|
::
|
||||||
|
:: .liv: suspended? if suspended, no agents should run
|
||||||
|
:: .add: agents not in manifest that should be running
|
||||||
|
:: .sub: agents in manifest that should not be running
|
||||||
|
::
|
||||||
|
+$ rein-9
|
||||||
|
$: liv=_&
|
||||||
|
add=(set dude)
|
||||||
|
sub=(set dude)
|
||||||
|
==
|
||||||
|
::
|
||||||
+$ pith-7
|
+$ pith-7
|
||||||
$: wef=(unit weft)
|
$: wef=(unit weft)
|
||||||
rem=(map desk per-desk) ::
|
rem=(map desk per-desk)
|
||||||
syn=(map kiln-sync let=@ud) ::
|
syn=(map kiln-sync let=@ud)
|
||||||
ark=(map desk arak-7) ::
|
ark=(map desk arak-7)
|
||||||
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
commit-timer=[way=wire nex=@da tim=@dr mon=term]
|
||||||
:: map desk to the currently ongoing fuse request
|
:: map desk to the currently ongoing fuse request
|
||||||
:: and the latest version numbers for beaks to
|
:: and the latest version numbers for beaks to
|
||||||
fus=(map desk per-fuse)
|
fus=(map desk per-fuse)
|
||||||
@ -74,16 +87,25 @@
|
|||||||
:: ensure they're unique even when the same
|
:: ensure they're unique even when the same
|
||||||
:: request is made multiple times.
|
:: request is made multiple times.
|
||||||
hxs=(map desk @ud)
|
hxs=(map desk @ud)
|
||||||
== ::
|
==
|
||||||
::
|
::
|
||||||
+$ arak-9
|
+$ arak-9
|
||||||
$: rail=(unit rail-9)
|
$: rail=(unit rail-9)
|
||||||
=rein
|
rein=rein-9
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ rail-9
|
||||||
|
$: publisher=(unit ship)
|
||||||
|
paused=?
|
||||||
|
=ship
|
||||||
|
=desk
|
||||||
|
=aeon
|
||||||
|
next=(list rung)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ arak-7
|
+$ arak-7
|
||||||
$: rail=(unit rail-7)
|
$: rail=(unit rail-7)
|
||||||
=rein
|
rein=rein-9
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ rail-7
|
+$ rail-7
|
||||||
@ -110,7 +132,7 @@
|
|||||||
hxs=(map desk @ud)
|
hxs=(map desk @ud)
|
||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
+$ arak-6 [rail=rail-6 next=(list rung) =rein]
|
+$ arak-6 [rail=rail-6 next=(list rung) rein=rein-9]
|
||||||
+$ rail-6 [paused=? =ship =desk =aeon]
|
+$ rail-6 [paused=? =ship =desk =aeon]
|
||||||
::
|
::
|
||||||
+$ pith-5
|
+$ pith-5
|
||||||
@ -147,7 +169,7 @@
|
|||||||
=desk
|
=desk
|
||||||
=aeon
|
=aeon
|
||||||
next=(list rung)
|
next=(list rung)
|
||||||
=rein
|
rein=rein-9
|
||||||
==
|
==
|
||||||
+$ pith-3 ::
|
+$ pith-3 ::
|
||||||
$: rem=(map desk per-desk) ::
|
$: rem=(map desk per-desk) ::
|
||||||
@ -287,6 +309,15 @@
|
|||||||
:^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez)
|
:^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez)
|
||||||
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
|
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
|
||||||
::
|
::
|
||||||
|
++ sources
|
||||||
|
=/ syns=(list [[syd=desk her=ship sud=desk] let=@ud]) ~(tap by syn)
|
||||||
|
=| sources=(map desk [ship desk])
|
||||||
|
|- ^+ sources
|
||||||
|
?~ syns
|
||||||
|
sources
|
||||||
|
=. sources (~(put by sources) desk.i.syns [her sud])
|
||||||
|
$(syns t.syns)
|
||||||
|
::
|
||||||
++ on-init
|
++ on-init
|
||||||
=< abet
|
=< abet
|
||||||
~> %slog.(fmt "boot")
|
~> %slog.(fmt "boot")
|
||||||
@ -296,26 +327,24 @@
|
|||||||
=. desks (~(del in desks) %kids)
|
=. desks (~(del in desks) %kids)
|
||||||
::
|
::
|
||||||
=/ sop=ship (sein:title our now our)
|
=/ sop=ship (sein:title our now our)
|
||||||
:: XX sync desks
|
|
||||||
:: set up base desk
|
:: set up base desk
|
||||||
::
|
::
|
||||||
=. ..on-init abet:(install-local:vats %base)
|
|
||||||
=? ..on-init ?=(?(%earl %duke %king) (clan:title our))
|
=? ..on-init ?=(?(%earl %duke %king) (clan:title our))
|
||||||
abet:(install:vats %base sop %kids)
|
abet:start-sync:(set-next:(auto %base sop %kids) `%kids)
|
||||||
:: install other desks and make them public
|
:: install other desks and make them public
|
||||||
::
|
::
|
||||||
=/ dez=(list desk) ~(tap in desks)
|
=/ dez=(list desk) ~(tap in desks)
|
||||||
|- ^+ ..on-init
|
|- ^+ ..on-init
|
||||||
?~ dez ..on-init
|
?~ dez ..on-init
|
||||||
=. ..on-init
|
=. ..on-init
|
||||||
abet:(install-local:vats i.dez)
|
(emit %pass /kiln-init-zest %arvo %c %zest i.dez %next)
|
||||||
=. ..on-init
|
=. ..on-init
|
||||||
%- emit
|
%- emit
|
||||||
:^ %pass /kiln/permission %arvo
|
:^ %pass /kiln/permission %arvo
|
||||||
[%c %perm i.dez / %r `[%black ~]]
|
[%c %perm i.dez / %r `[%black ~]]
|
||||||
=/ src (get-publisher our i.dez now)
|
=/ src (get-publisher our i.dez now)
|
||||||
=? ..on-init &(?=(^ src) !=(our u.src))
|
=? ..on-init &(?=(^ src) !=(our u.src))
|
||||||
abet:(install:vats i.dez u.src i.dez)
|
abet:start-sync:(auto i.dez u.src i.dez)
|
||||||
$(dez t.dez)
|
$(dez t.dez)
|
||||||
::
|
::
|
||||||
++ on-load
|
++ on-load
|
||||||
@ -423,6 +452,9 @@
|
|||||||
[%x %kiln %base-hash ~]
|
[%x %kiln %base-hash ~]
|
||||||
=/ ver (mergebase-hashes our %base now (~(got by ark) %base))
|
=/ ver (mergebase-hashes our %base now (~(got by ark) %base))
|
||||||
``noun+!>(?~(ver 0v0 i.ver))
|
``noun+!>(?~(ver 0v0 i.ver))
|
||||||
|
::
|
||||||
|
[%x %kiln %syncs ~] ``noun+!>(syn)
|
||||||
|
[%x %kiln %sources ~] ``noun+!>(sources)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: +get-germ: select merge strategy into local desk
|
:: +get-germ: select merge strategy into local desk
|
||||||
@ -457,7 +489,6 @@
|
|||||||
%kiln-nuke =;(f (f !<(_+<.f vase)) poke-nuke)
|
%kiln-nuke =;(f (f !<(_+<.f vase)) poke-nuke)
|
||||||
%kiln-pause =;(f (f !<(_+<.f vase)) poke-pause)
|
%kiln-pause =;(f (f !<(_+<.f vase)) poke-pause)
|
||||||
%kiln-permission =;(f (f !<(_+<.f vase)) poke-permission)
|
%kiln-permission =;(f (f !<(_+<.f vase)) poke-permission)
|
||||||
%kiln-resume =;(f (f !<(_+<.f vase)) poke-resume)
|
|
||||||
%kiln-revive =;(f (f !<(_+<.f vase)) poke-revive)
|
%kiln-revive =;(f (f !<(_+<.f vase)) poke-revive)
|
||||||
%kiln-rein =;(f (f !<(_+<.f vase)) poke-rein)
|
%kiln-rein =;(f (f !<(_+<.f vase)) poke-rein)
|
||||||
%kiln-rm =;(f (f !<(_+<.f vase)) poke-rm)
|
%kiln-rm =;(f (f !<(_+<.f vase)) poke-rm)
|
||||||
@ -577,7 +608,9 @@
|
|||||||
::
|
::
|
||||||
++ poke-install
|
++ poke-install
|
||||||
|= [loc=desk her=ship rem=desk]
|
|= [loc=desk her=ship rem=desk]
|
||||||
abet:abet:(install:vats +<)
|
:: XX should check if already installed before changing zest?
|
||||||
|
=. ..on-init (emit %pass /kiln-install %arvo %c %zest loc %next)
|
||||||
|
(poke-sync loc her rem)
|
||||||
::
|
::
|
||||||
++ poke-label
|
++ poke-label
|
||||||
|= [syd=desk lab=@tas aey=(unit aeon)]
|
|= [syd=desk lab=@tas aey=(unit aeon)]
|
||||||
@ -603,12 +636,15 @@
|
|||||||
?. desk
|
?. desk
|
||||||
(emit %pass /nuke %arvo %g [%nuke term])
|
(emit %pass /nuke %arvo %g [%nuke term])
|
||||||
%- emil
|
%- emil
|
||||||
%+ turn (get-apps-have our term now)
|
:: XX
|
||||||
|
%+ turn *(list [dude ?]) :: (get-apps-have our term now)
|
||||||
|=([=dude ?] [%pass /nuke %arvo %g [%nuke dude]])
|
|=([=dude ?] [%pass /nuke %arvo %g [%nuke dude]])
|
||||||
::
|
::
|
||||||
++ poke-pause
|
++ poke-pause
|
||||||
|= =desk
|
|= =desk
|
||||||
abet:abet:(pause:vats desk)
|
?~ got=(~(get by sources) desk)
|
||||||
|
abet:(spam leaf+"desk not installed: {<desk>}" ~)
|
||||||
|
(poke-unsync desk u.got)
|
||||||
::
|
::
|
||||||
++ poke-permission
|
++ poke-permission
|
||||||
|= [syd=desk pax=path pub=?]
|
|= [syd=desk pax=path pub=?]
|
||||||
@ -619,15 +655,11 @@
|
|||||||
::
|
::
|
||||||
++ poke-rein
|
++ poke-rein
|
||||||
|= [=desk =rein]
|
|= [=desk =rein]
|
||||||
abet:abet:(set-rein:vats +<)
|
abet:(emit %pass /kiln-rein %arvo %c %rein desk rein)
|
||||||
::
|
|
||||||
++ poke-resume
|
|
||||||
|= =desk
|
|
||||||
abet:abet:(resume:vats desk)
|
|
||||||
::
|
::
|
||||||
++ poke-revive
|
++ poke-revive
|
||||||
|= =desk
|
|= =desk
|
||||||
abet:abet:(revive:vats desk)
|
abet:(emit %pass /kiln-revive %arvo %c %zest desk %live)
|
||||||
::
|
::
|
||||||
++ poke-rm
|
++ poke-rm
|
||||||
|= a=path
|
|= a=path
|
||||||
@ -646,13 +678,14 @@
|
|||||||
::
|
::
|
||||||
++ poke-suspend
|
++ poke-suspend
|
||||||
|= =desk
|
|= =desk
|
||||||
abet:abet:(suspend:vats desk)
|
abet:(emit %pass /kiln-suspend %arvo %c %zest desk %dead)
|
||||||
::
|
::
|
||||||
++ poke-sync
|
++ poke-sync
|
||||||
|= hos=kiln-sync
|
|= [hos=kiln-sync nex=(unit desk)]
|
||||||
?: (~(has by syn) hos)
|
?^ got=(~(get by syn) hos)
|
||||||
|
=. syn (~(put by syn) hos u.got(nex nex))
|
||||||
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
||||||
abet:abet:start-sync:(auto hos)
|
abet:abet:start-sync:(set-next:(auto hos) nex)
|
||||||
::
|
::
|
||||||
++ poke-syncs :: print sync config
|
++ poke-syncs :: print sync config
|
||||||
|= ~
|
|= ~
|
||||||
@ -670,7 +703,10 @@
|
|||||||
::
|
::
|
||||||
++ poke-uninstall
|
++ poke-uninstall
|
||||||
|= loc=desk
|
|= loc=desk
|
||||||
abet:(uninstall:vats +<)
|
?~ got=(~(get by sources) loc)
|
||||||
|
abet:(spam leaf+"desk not installed: {<loc>}" ~)
|
||||||
|
=. ..on-init (emit %pass /kiln-uninstall %arvo %c %zest loc %dead)
|
||||||
|
(poke-unsync loc u.got)
|
||||||
::
|
::
|
||||||
++ poke-unmount
|
++ poke-unmount
|
||||||
|= mon=kiln-unmount
|
|= mon=kiln-unmount
|
||||||
@ -696,7 +732,7 @@
|
|||||||
?> (team:title our src)
|
?> (team:title our src)
|
||||||
?+ path ~|(kiln-path/path !!)
|
?+ path ~|(kiln-path/path !!)
|
||||||
[%vats ~]
|
[%vats ~]
|
||||||
abet(moz :_(moz [%give %fact ~ %kiln-vats-snap-0 !>(ark)]))
|
(mean leaf+"kiln: old subscription to /kiln/vats failed" ~)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ take-agent
|
++ take-agent
|
||||||
@ -727,7 +763,7 @@
|
|||||||
?>(?=(%writ +<.sign-arvo) +>.sign-arvo)
|
?>(?=(%writ +<.sign-arvo) +>.sign-arvo)
|
||||||
[%autocommit *] %+ take-wake-autocommit t.wire
|
[%autocommit *] %+ take-wake-autocommit t.wire
|
||||||
?>(?=(%wake +<.sign-arvo) +>.sign-arvo)
|
?>(?=(%wake +<.sign-arvo) +>.sign-arvo)
|
||||||
[%vats *] abet:(take:vats t.wire sign-arvo)
|
[%vats *] ..abet
|
||||||
[%fuse-request @tas *]
|
[%fuse-request @tas *]
|
||||||
=/ f (fuzz i.t.wire now)
|
=/ f (fuzz i.t.wire now)
|
||||||
?~ f
|
?~ f
|
||||||
@ -945,7 +981,7 @@
|
|||||||
::
|
::
|
||||||
++ auto
|
++ auto
|
||||||
|= kiln-sync
|
|= kiln-sync
|
||||||
=+ (~(gut by syn) [syd her sud] let=*@ud)
|
=+ (~(gut by syn) [syd her sud] let=*@ud nex=~)
|
||||||
|%
|
|%
|
||||||
++ abet
|
++ abet
|
||||||
..auto(syn (~(put by syn) [syd her sud] let))
|
..auto(syn (~(put by syn) [syd her sud] let))
|
||||||
@ -964,6 +1000,10 @@
|
|||||||
=> (spam (render "ended autosync" sud her syd) ~)
|
=> (spam (render "ended autosync" sud her syd) ~)
|
||||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||||
(warp wire her sud ~)
|
(warp wire her sud ~)
|
||||||
|
::
|
||||||
|
++ set-next
|
||||||
|
|= nex=(unit desk)
|
||||||
|
..abet(nex nex)
|
||||||
:: duplicate of start-sync? see |track
|
:: duplicate of start-sync? see |track
|
||||||
::
|
::
|
||||||
++ start-track
|
++ start-track
|
||||||
@ -1028,6 +1068,7 @@
|
|||||||
leaf+"note: blank desk {<sud>} on {<her>}"
|
leaf+"note: blank desk {<sud>} on {<her>}"
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
:: XX fire merge to nex
|
||||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||||
(warp wire her sud `[%sing %y ud+let /])
|
(warp wire her sud `[%sing %y ud+let /])
|
||||||
--
|
--
|
||||||
|
@ -777,7 +777,7 @@
|
|||||||
[%park des=desk yok=yoki ran=rang] :: synchronous commit
|
[%park des=desk yok=yoki ran=rang] :: synchronous commit
|
||||||
[%perm des=desk pax=path rit=rite] :: change permissions
|
[%perm des=desk pax=path rit=rite] :: change permissions
|
||||||
[%pork ~] :: resume commit
|
[%pork ~] :: resume commit
|
||||||
[%rein des=desk liv=zest ren=(map dude:gall ?)] :: live
|
[%rein des=desk ren=rein] :: extra apps
|
||||||
[%stir arg=*] :: debug
|
[%stir arg=*] :: debug
|
||||||
[%tire p=(unit ~)] :: app state subscribe
|
[%tire p=(unit ~)] :: app state subscribe
|
||||||
[%tomb =clue] :: tombstone specific
|
[%tomb =clue] :: tombstone specific
|
||||||
@ -785,6 +785,7 @@
|
|||||||
$>(%vega vane-task) :: report upgrade
|
$>(%vega vane-task) :: report upgrade
|
||||||
[%warp wer=ship rif=riff] :: internal file req
|
[%warp wer=ship rif=riff] :: internal file req
|
||||||
[%werp who=ship wer=ship rif=riff-any] :: external file req
|
[%werp who=ship wer=ship rif=riff-any] :: external file req
|
||||||
|
[%zest des=desk liv=zest] :: live
|
||||||
$>(%plea vane-task) :: ames request
|
$>(%plea vane-task) :: ames request
|
||||||
== ::
|
== ::
|
||||||
:: ::
|
:: ::
|
||||||
@ -894,6 +895,7 @@
|
|||||||
who=(pair (set ship) (map @ta crew)) ::
|
who=(pair (set ship) (map @ta crew)) ::
|
||||||
== ::
|
== ::
|
||||||
+$ regs (map path rule) :: rules for paths
|
+$ regs (map path rule) :: rules for paths
|
||||||
|
+$ rein (map dude:gall ?) :: extra apps
|
||||||
+$ riff [p=desk q=(unit rave)] :: request+desist
|
+$ riff [p=desk q=(unit rave)] :: request+desist
|
||||||
+$ riff-any ::
|
+$ riff-any ::
|
||||||
$% [%1 =riff] ::
|
$% [%1 =riff] ::
|
||||||
|
@ -324,17 +324,6 @@
|
|||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
+$ bill (list dude:gall)
|
+$ bill (list dude:gall)
|
||||||
:: diff from desk.bill
|
|
||||||
::
|
|
||||||
:: -- `.liv`: suspended? if suspended, no agents should run
|
|
||||||
:: -- `.add`: agents not in manifest that should be running
|
|
||||||
:: -- `.sub`: agents in manifest that should not be running
|
|
||||||
::
|
|
||||||
+$ rein
|
|
||||||
$: liv=zest
|
|
||||||
add=(set dude:gall)
|
|
||||||
sub=(set dude:gall)
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
:: Active downloads
|
:: Active downloads
|
||||||
::
|
::
|
||||||
@ -3060,11 +3049,15 @@
|
|||||||
|= r=rule
|
|= r=rule
|
||||||
r(who (~(del in who.r) |+nom))
|
r(who (~(del in who.r) |+nom))
|
||||||
::
|
::
|
||||||
++ rein
|
++ set-rein
|
||||||
|= [liv=zest ren=(map dude:gall ?)]
|
|= [ren=(map dude:gall ?)]
|
||||||
^+ ..park
|
^+ ..park
|
||||||
|
..park(ren.dom ren)
|
||||||
|
::
|
||||||
|
++ set-zest
|
||||||
|
|= liv=zest
|
||||||
=? liv =(%base syd) %live
|
=? liv =(%base syd) %live
|
||||||
..park(liv.dom liv, ren.dom ren)
|
..park(liv.dom liv)
|
||||||
::
|
::
|
||||||
++ rise
|
++ rise
|
||||||
|= [=dude:gall on=(unit ?)]
|
|= [=dude:gall on=(unit ?)]
|
||||||
@ -4711,7 +4704,7 @@
|
|||||||
%rein
|
%rein
|
||||||
=^ m1 ruf
|
=^ m1 ruf
|
||||||
=/ den ((de now rof hen ruf) our des.req)
|
=/ den ((de now rof hen ruf) our des.req)
|
||||||
abet:(rein:den liv.req ren.req)
|
abet:(set-rein:den ren.req)
|
||||||
=^ m2 ruf abet:goad:(lu now rof hen ruf)
|
=^ m2 ruf abet:goad:(lu now rof hen ruf)
|
||||||
[(weld m1 m2) ..^$]
|
[(weld m1 m2) ..^$]
|
||||||
::
|
::
|
||||||
@ -4801,6 +4794,13 @@
|
|||||||
cancel-request:den
|
cancel-request:den
|
||||||
(start-request:den for u.q.rif)
|
(start-request:den for u.q.rif)
|
||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
|
::
|
||||||
|
%zest
|
||||||
|
=^ m1 ruf
|
||||||
|
=/ den ((de now rof hen ruf) our des.req)
|
||||||
|
abet:(set-zest:den liv.req)
|
||||||
|
=^ m2 ruf abet:goad:(lu now rof hen ruf)
|
||||||
|
[(weld m1 m2) ..^$]
|
||||||
::
|
::
|
||||||
%plea
|
%plea
|
||||||
=* her ship.req
|
=* her ship.req
|
||||||
@ -5414,6 +5414,7 @@
|
|||||||
%rang ``[%rang !>(ran.ruf)]
|
%rang ``[%rang !>(ran.ruf)]
|
||||||
%tomb ``[%flag !>((tomb t.path))]
|
%tomb ``[%flag !>((tomb t.path))]
|
||||||
%domes domes
|
%domes domes
|
||||||
|
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ domes
|
++ domes
|
||||||
|
@ -1,83 +1,59 @@
|
|||||||
=, clay
|
=, clay
|
||||||
=* dude dude:gall
|
=* dude dude:gall
|
||||||
|%
|
|%
|
||||||
:: $snap: kiln snapshot
|
|
||||||
::
|
|
||||||
+$ snap (map desk arak)
|
|
||||||
:: $diff: subscription update
|
|
||||||
::
|
|
||||||
+$ diff
|
|
||||||
$% [%block =desk =arak =weft blockers=(set desk)]
|
|
||||||
[%reset =desk =arak]
|
|
||||||
[%commit =desk =arak]
|
|
||||||
[%merge-sunk =desk =arak =tang]
|
|
||||||
[%merge-fail =desk =arak =tang]
|
|
||||||
[%suspend =desk =arak]
|
|
||||||
[%revive =desk =arak]
|
|
||||||
==
|
|
||||||
:: $rung: reference to upstream commit
|
:: $rung: reference to upstream commit
|
||||||
::
|
::
|
||||||
+$ rung [=aeon =weft]
|
+$ rung [=aeon =weft]
|
||||||
:: $rein: diff from desk manifest
|
|
||||||
::
|
::
|
||||||
:: .liv: suspended? if suspended, no agents should run
|
:: XX
|
||||||
:: .add: agents not in manifest that should be running
|
:: +$ vat [=desk hash=@uv =cass =arak]
|
||||||
:: .sub: agents in manifest that should not be running
|
:: :: +report-vats: report on all desk installations
|
||||||
::
|
:: ::
|
||||||
+$ rein
|
:: ++ report-vats
|
||||||
$: liv=_&
|
:: |= [our=@p now=@da]
|
||||||
add=(set dude)
|
:: ^- tang
|
||||||
sub=(set dude)
|
:: =+ .^ raz=(list vat)
|
||||||
==
|
:: %gx /(scot %p our)/hood/(scot %da now)/kiln/vats/noun
|
||||||
::
|
:: ==
|
||||||
+$ vat [=desk hash=@uv =cass =arak]
|
:: :- (report-kids our now)
|
||||||
:: +report-vats: report on all desk installations
|
:: (turn raz |=(v=vat (report-vat our now v)))
|
||||||
::
|
:: :: +report-vat: report on a single desk installation
|
||||||
++ report-vats
|
:: ::
|
||||||
|= [our=@p now=@da]
|
:: ++ report-vat
|
||||||
^- tang
|
:: |= [our=ship now=@da vat]
|
||||||
=+ .^ raz=(list vat)
|
:: ^- tank
|
||||||
%gx /(scot %p our)/hood/(scot %da now)/kiln/vats/noun
|
:: ?: =(ud.cass 0)
|
||||||
==
|
:: leaf+"desk does not yet exist: {<desk>}"
|
||||||
:- (report-kids our now)
|
:: =/ kel-path
|
||||||
(turn raz |=(v=vat (report-vat our now v)))
|
:: /(scot %p our)/[desk]/(scot %da now)/sys/kelvin
|
||||||
:: +report-vat: report on a single desk installation
|
:: ?. .^(? %cu kel-path)
|
||||||
::
|
:: leaf+"bad desk: {<desk>}"
|
||||||
++ report-vat
|
:: =+ .^(=weft %cx kel-path)
|
||||||
|= [our=ship now=@da vat]
|
:: :+ %rose ["" "{<desk>}" "::"]
|
||||||
^- tank
|
:: ^- tang
|
||||||
?: =(ud.cass 0)
|
:: =/ meb (mergebase-hashes our desk now arak)
|
||||||
leaf+"desk does not yet exist: {<desk>}"
|
:: =/ poz
|
||||||
=/ kel-path
|
:: ?~ rail.arak "local"
|
||||||
/(scot %p our)/[desk]/(scot %da now)/sys/kelvin
|
:: ?:(paused.u.rail.arak "paused" "tracking")
|
||||||
?. .^(? %cu kel-path)
|
:: =/ sat ?:(liv.rein.arak "running" "suspended")
|
||||||
leaf+"bad desk: {<desk>}"
|
:: =/ pen
|
||||||
=+ .^(=weft %cx kel-path)
|
:: ?~ rail.arak "~"
|
||||||
:+ %rose ["" "{<desk>}" "::"]
|
:: <(turn next.u.rail.arak |=([@ lal=@tas num=@] [lal num]))>
|
||||||
^- tang
|
:: :~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
||||||
=/ meb (mergebase-hashes our desk now arak)
|
:: leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
||||||
=/ poz
|
:: leaf/"%cz hash: {<hash>}"
|
||||||
?~ rail.arak "local"
|
:: ::
|
||||||
?:(paused.u.rail.arak "paused" "tracking")
|
:: leaf/"app status: {sat}"
|
||||||
=/ sat ?:(liv.rein.arak "running" "suspended")
|
:: leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
||||||
=/ pen
|
:: leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
||||||
?~ rail.arak "~"
|
:: ::
|
||||||
<(turn next.u.rail.arak |=([@ lal=@tas num=@] [lal num]))>
|
:: leaf/"publishing ship: {?~(rail.arak <~> <publisher.u.rail.arak>)}"
|
||||||
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
:: leaf/"updates: {poz}"
|
||||||
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
:: leaf/"source ship: {?~(rail.arak <~> <ship.u.rail.arak>)}"
|
||||||
leaf/"%cz hash: {<hash>}"
|
:: leaf/"source desk: {?~(rail.arak <~> <desk.u.rail.arak>)}"
|
||||||
::
|
:: leaf/"source aeon: {?~(rail.arak <~> <aeon.u.rail.arak>)}"
|
||||||
leaf/"app status: {sat}"
|
:: leaf/"pending updates: {pen}"
|
||||||
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
:: ==
|
||||||
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
|
||||||
::
|
|
||||||
leaf/"publishing ship: {?~(rail.arak <~> <publisher.u.rail.arak>)}"
|
|
||||||
leaf/"updates: {poz}"
|
|
||||||
leaf/"source ship: {?~(rail.arak <~> <ship.u.rail.arak>)}"
|
|
||||||
leaf/"source desk: {?~(rail.arak <~> <desk.u.rail.arak>)}"
|
|
||||||
leaf/"source aeon: {?~(rail.arak <~> <aeon.u.rail.arak>)}"
|
|
||||||
leaf/"pending updates: {pen}"
|
|
||||||
==
|
|
||||||
:: +report-kids: non-vat cz hash report for kids desk
|
:: +report-kids: non-vat cz hash report for kids desk
|
||||||
::
|
::
|
||||||
++ report-kids
|
++ report-kids
|
||||||
@ -143,21 +119,6 @@
|
|||||||
?. .^(? cu/pax)
|
?. .^(? cu/pax)
|
||||||
*(list dude)
|
*(list dude)
|
||||||
.^((list dude) cx/pax)
|
.^((list dude) cx/pax)
|
||||||
:: +adjust-dudes: which agents should be started and stopped
|
|
||||||
::
|
|
||||||
:: Will ask Gall to start agents that it's already running
|
|
||||||
:: but that should be ok, and might be safer in case other
|
|
||||||
:: unprocessed moves would have turned them off.
|
|
||||||
::
|
|
||||||
++ adjust-dudes
|
|
||||||
|= $: local=[our=ship =desk now=@da]
|
|
||||||
=rein
|
|
||||||
==
|
|
||||||
^- [jolt=(list dude) idle=(list dude)]
|
|
||||||
=/ all=(list dude) (read-bill local)
|
|
||||||
=/ want (get-apps-want local all rein)
|
|
||||||
=/ have (get-apps-live local)
|
|
||||||
[want (skip have ~(has in (sy want)))]
|
|
||||||
::
|
::
|
||||||
++ get-remote-diff
|
++ get-remote-diff
|
||||||
|= [our=ship here=desk now=@da her=ship there=desk when=aeon]
|
|= [our=ship here=desk now=@da her=ship there=desk when=aeon]
|
||||||
@ -172,49 +133,51 @@
|
|||||||
?. .^(? %cu pax) ~
|
?. .^(? %cu pax) ~
|
||||||
`.^(ship %cx pax)
|
`.^(ship %cx pax)
|
||||||
::
|
::
|
||||||
++ get-apps-live
|
:: XX
|
||||||
|= [our=ship =desk now=@da]
|
:: ++ get-apps-live
|
||||||
^- (list dude)
|
:: |= [our=ship =desk now=@da]
|
||||||
%+ murn (get-apps-have our desk now)
|
:: ^- (list dude)
|
||||||
|=([=dude live=?] ?.(live ~ `dude))
|
:: %+ murn (get-apps-have our desk now)
|
||||||
:: +get-apps-have: find which apps Gall is running on a desk
|
:: |=([=dude live=?] ?.(live ~ `dude))
|
||||||
::
|
:: :: +get-apps-have: find which apps Gall is running on a desk
|
||||||
++ get-apps-have
|
:: ::
|
||||||
|= [our=ship =desk now=@da]
|
:: ++ get-apps-have
|
||||||
^- (list [=dude live=?])
|
:: |= [our=ship =desk now=@da]
|
||||||
%~ tap in
|
:: ^- (list [=dude live=?])
|
||||||
.^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
|
:: %~ tap in
|
||||||
:: +get-apps-want: find which apps should be running on a desk
|
:: .^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
|
||||||
::
|
:: :: +get-apps-want: find which apps should be running on a desk
|
||||||
++ get-apps-want
|
:: ::
|
||||||
|= [local=[our=ship =desk now=@da] duz=(list dude) =rein]
|
:: ++ get-apps-want
|
||||||
^- (list dude)
|
:: |= [local=[our=ship =desk now=@da] duz=(list dude) =rein]
|
||||||
?. liv.rein ~
|
:: ^- (list dude)
|
||||||
?. |(=(`zuse+zuse (read-kelvin-local local)) =(%base desk.local)) ~
|
:: ?. liv.rein ~
|
||||||
=. duz (skip duz ~(has in sub.rein))
|
:: ?. |(=(`zuse+zuse (read-kelvin-local local)) =(%base desk.local)) ~
|
||||||
=. duz (weld duz (skip ~(tap in add.rein) ~(has in (sy duz))))
|
:: =. duz (skip duz ~(has in sub.rein))
|
||||||
duz
|
:: =. duz (weld duz (skip ~(tap in add.rein) ~(has in (sy duz))))
|
||||||
::
|
:: duz
|
||||||
++ mergebase-hashes
|
:: ::
|
||||||
|= [our=@p =desk now=@da =arak]
|
:: ++ mergebase-hashes
|
||||||
?~ rail.arak
|
:: |= [our=@p =desk now=@da =arak]
|
||||||
~
|
:: ?~ rail.arak
|
||||||
=/ her (scot %p ship.u.rail.arak)
|
:: ~
|
||||||
=/ ego (scot %p our)
|
:: =/ her (scot %p ship.u.rail.arak)
|
||||||
=/ wen (scot %da now)
|
:: =/ ego (scot %p our)
|
||||||
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.u.rail.arak])
|
:: =/ wen (scot %da now)
|
||||||
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
:: %+ turn .^((list tako) %cs ~[ego desk wen %base her desk.u.rail.arak])
|
||||||
|
:: |=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
||||||
::
|
::
|
||||||
++ enjs
|
++ enjs
|
||||||
=, enjs:format
|
=, enjs:format
|
||||||
|%
|
|%
|
||||||
++ vats
|
:: XX
|
||||||
|= v=(list ^vat)
|
:: ++ vats
|
||||||
^- json
|
:: |= v=(list ^vat)
|
||||||
%- pairs
|
:: ^- json
|
||||||
%+ turn v
|
:: %- pairs
|
||||||
|= va=^vat
|
:: %+ turn v
|
||||||
[desk.va (vat va)]
|
:: |= va=^vat
|
||||||
|
:: [desk.va (vat va)]
|
||||||
::
|
::
|
||||||
++ tim
|
++ tim
|
||||||
|= t=@
|
|= t=@
|
||||||
@ -228,14 +191,15 @@
|
|||||||
da+(tim da.c)
|
da+(tim da.c)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ vat
|
:: XX
|
||||||
|= v=^vat
|
:: ++ vat
|
||||||
%- pairs
|
:: |= v=^vat
|
||||||
:~ desk+s+desk.v
|
:: %- pairs
|
||||||
hash+s+(scot %uv hash.v)
|
:: :~ desk+s+desk.v
|
||||||
cass+(cass cass.v)
|
:: hash+s+(scot %uv hash.v)
|
||||||
arak+(arak arak.v)
|
:: cass+(cass cass.v)
|
||||||
==
|
:: arak+(arak arak.v)
|
||||||
|
:: ==
|
||||||
::
|
::
|
||||||
++ weft
|
++ weft
|
||||||
|= w=^weft
|
|= w=^weft
|
||||||
@ -251,29 +215,13 @@
|
|||||||
weft+(weft weft.r)
|
weft+(weft weft.r)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ rein
|
:: XX
|
||||||
|= r=^rein
|
:: ++ rein
|
||||||
%- pairs
|
:: |= r=^rein
|
||||||
:~ add+a+(turn ~(tap in add.r) (lead %s))
|
:: %- pairs
|
||||||
sub+a+(turn ~(tap in sub.r) (lead %s))
|
:: :~ add+a+(turn ~(tap in add.r) (lead %s))
|
||||||
==
|
:: sub+a+(turn ~(tap in sub.r) (lead %s))
|
||||||
|
:: ==
|
||||||
::
|
::
|
||||||
++ arak
|
|
||||||
|= a=^arak
|
|
||||||
%- pairs
|
|
||||||
:~ rail+?~(rail.a ~ (rail u.rail.a))
|
|
||||||
rein+(rein rein.a)
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ rail
|
|
||||||
|= r=^rail
|
|
||||||
%- pairs
|
|
||||||
:~ ship+s+(scot %p ship.r)
|
|
||||||
publisher+?~(publisher.r ~ s+(scot %p u.publisher.r))
|
|
||||||
desk+s+desk.r
|
|
||||||
paused+b+paused.r
|
|
||||||
aeon+(numb aeon.r)
|
|
||||||
next+a+(turn next.r rung)
|
|
||||||
==
|
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user