2021-09-02 00:37:56 +03:00
|
|
|
=, clay
|
|
|
|
=* dude dude:gall
|
|
|
|
|%
|
2021-09-06 17:27:17 +03:00
|
|
|
:: $rung: reference to upstream commit
|
|
|
|
::
|
|
|
|
+$ rung [=aeon =weft]
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
2022-08-26 08:57:20 +03:00
|
|
|
:: XX
|
|
|
|
:: +$ vat [=desk hash=@uv =cass =arak]
|
|
|
|
:: :: +report-vats: report on all desk installations
|
|
|
|
:: ::
|
|
|
|
:: ++ report-vats
|
|
|
|
:: |= [our=@p now=@da]
|
|
|
|
:: ^- tang
|
|
|
|
:: =+ .^ raz=(list vat)
|
|
|
|
:: %gx /(scot %p our)/hood/(scot %da now)/kiln/vats/noun
|
|
|
|
:: ==
|
|
|
|
:: :- (report-kids our now)
|
|
|
|
:: (turn raz |=(v=vat (report-vat our now v)))
|
|
|
|
:: :: +report-vat: report on a single desk installation
|
|
|
|
:: ::
|
|
|
|
:: ++ report-vat
|
|
|
|
:: |= [our=ship now=@da vat]
|
|
|
|
:: ^- tank
|
|
|
|
:: ?: =(ud.cass 0)
|
|
|
|
:: leaf+"desk does not yet exist: {<desk>}"
|
|
|
|
:: =/ kel-path
|
|
|
|
:: /(scot %p our)/[desk]/(scot %da now)/sys/kelvin
|
|
|
|
:: ?. .^(? %cu kel-path)
|
|
|
|
:: leaf+"bad desk: {<desk>}"
|
|
|
|
:: =+ .^(=weft %cx kel-path)
|
|
|
|
:: :+ %rose ["" "{<desk>}" "::"]
|
|
|
|
:: ^- tang
|
|
|
|
:: =/ meb (mergebase-hashes our desk now arak)
|
|
|
|
:: =/ poz
|
|
|
|
:: ?~ rail.arak "local"
|
|
|
|
:: ?:(paused.u.rail.arak "paused" "tracking")
|
|
|
|
:: =/ sat ?:(liv.rein.arak "running" "suspended")
|
|
|
|
:: =/ pen
|
|
|
|
:: ?~ rail.arak "~"
|
|
|
|
:: <(turn next.u.rail.arak |=([@ lal=@tas num=@] [lal num]))>
|
|
|
|
:: :~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
|
|
|
:: leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
|
|
|
:: leaf/"%cz hash: {<hash>}"
|
|
|
|
:: ::
|
|
|
|
:: leaf/"app status: {sat}"
|
|
|
|
:: 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}"
|
|
|
|
:: ==
|
2021-10-01 15:08:11 +03:00
|
|
|
:: +report-kids: non-vat cz hash report for kids desk
|
|
|
|
::
|
|
|
|
++ report-kids
|
|
|
|
|= [our=ship now=@da]
|
|
|
|
^- tank
|
|
|
|
=/ dek %kids
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
2021-10-01 15:31:18 +03:00
|
|
|
?. (~(has in .^((set desk) %cd /[ego]//[wen])) dek)
|
2021-10-01 15:08:11 +03:00
|
|
|
leaf/"no %kids desk"
|
|
|
|
=+ .^(hash=@uv %cz /[ego]/[dek]/[wen])
|
|
|
|
leaf/"%kids %cz hash: {<hash>}"
|
2021-09-02 00:37:56 +03:00
|
|
|
:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
|
|
|
|
::
|
|
|
|
++ read-kelvin-foreign
|
|
|
|
|= [=ship =desk =aeon]
|
|
|
|
^- weft
|
2021-09-29 21:59:13 +03:00
|
|
|
~| read-foreign-kelvin/+<
|
2021-09-02 00:37:56 +03:00
|
|
|
=/ her (scot %p ship)
|
|
|
|
=/ syd (scot %tas desk)
|
|
|
|
=/ yon (scot %ud aeon)
|
|
|
|
::
|
|
|
|
=/ dom .^(dome cv/~[her syd yon])
|
|
|
|
=/ tak (scot %uv (~(got by hit.dom) let.dom))
|
|
|
|
=/ yak .^(yaki cs/~[her syd yon %yaki tak])
|
|
|
|
=/ lob (scot %uv (~(got by q.yak) /sys/kelvin))
|
2022-04-13 10:15:31 +03:00
|
|
|
=/ peg .^(page cs/~[her syd yon %blob lob])
|
|
|
|
;;(weft q.peg)
|
2021-09-02 00:37:56 +03:00
|
|
|
:: +read-kelvin-local: read /sys/kelvin from a local desk
|
|
|
|
::
|
|
|
|
++ read-kelvin-local
|
|
|
|
|= [our=ship =desk now=@da]
|
|
|
|
^- (unit weft)
|
2021-09-27 00:03:26 +03:00
|
|
|
~| read-kelvin-local+desk
|
2021-09-02 00:37:56 +03:00
|
|
|
=/ pax (en-beam [our desk da+now] /sys/kelvin)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. .^(? cu/pax)
|
2021-09-02 00:37:56 +03:00
|
|
|
~
|
|
|
|
[~ .^(weft cx/pax)]
|
2021-09-13 01:35:17 +03:00
|
|
|
:: +read-bill-foreign: read /desk/bill from a foreign desk
|
|
|
|
::
|
|
|
|
++ read-bill-foreign
|
|
|
|
|= [=ship =desk =aeon]
|
2021-09-27 00:03:26 +03:00
|
|
|
^- (list dude)
|
2021-09-27 23:57:38 +03:00
|
|
|
~| +<
|
2021-09-13 01:35:17 +03:00
|
|
|
=/ her (scot %p ship)
|
|
|
|
=/ syd (scot %tas desk)
|
|
|
|
=/ yon (scot %ud aeon)
|
|
|
|
::
|
|
|
|
=/ dom .^(dome cv/~[her syd yon])
|
2021-09-27 23:57:38 +03:00
|
|
|
=/ tak ~| aeons=~(key by hit.dom)
|
|
|
|
(scot %uv (~(got by hit.dom) aeon))
|
2021-09-13 01:35:17 +03:00
|
|
|
=/ yak .^(yaki cs/~[her syd yon %yaki tak])
|
2021-09-27 04:54:36 +03:00
|
|
|
=/ fil (~(get by q.yak) /desk/bill)
|
|
|
|
?~ fil ~
|
|
|
|
=/ lob (scot %uv u.fil)
|
2022-04-13 10:15:31 +03:00
|
|
|
=/ peg .^(page cs/~[her syd yon %blob lob])
|
|
|
|
;;((list dude) q.peg)
|
2021-09-02 00:37:56 +03:00
|
|
|
:: +read-bill: read contents of /desk/bill manifest
|
|
|
|
::
|
|
|
|
++ read-bill
|
2021-09-27 23:57:38 +03:00
|
|
|
|= [our=ship =desk now=@da]
|
2021-09-02 00:37:56 +03:00
|
|
|
=/ pax (en-beam [our desk da+now] /desk/bill)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. .^(? cu/pax)
|
2021-09-27 00:03:26 +03:00
|
|
|
*(list dude)
|
|
|
|
.^((list dude) cx/pax)
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
2021-09-27 21:50:58 +03:00
|
|
|
++ get-remote-diff
|
|
|
|
|= [our=ship here=desk now=@da her=ship there=desk when=aeon]
|
|
|
|
=+ .^(our-hash=@uv cz/[(scot %p our) here (scot %da now) ~])
|
|
|
|
=+ .^(her-hash=@uv cz/[(scot %p her) there (scot %ud when) ~])
|
|
|
|
!=(our-hash her-hash)
|
|
|
|
::
|
2021-09-29 06:26:30 +03:00
|
|
|
++ get-publisher
|
|
|
|
|= [our=ship =desk now=@da]
|
|
|
|
^- (unit ship)
|
|
|
|
=/ pax /(scot %p our)/[desk]/(scot %da now)/desk/ship
|
|
|
|
?. .^(? %cu pax) ~
|
|
|
|
`.^(ship %cx pax)
|
|
|
|
::
|
2022-08-26 08:57:20 +03:00
|
|
|
:: XX
|
|
|
|
:: ++ get-apps-live
|
|
|
|
:: |= [our=ship =desk now=@da]
|
|
|
|
:: ^- (list dude)
|
|
|
|
:: %+ murn (get-apps-have our desk now)
|
|
|
|
:: |=([=dude live=?] ?.(live ~ `dude))
|
|
|
|
:: :: +get-apps-have: find which apps Gall is running on a desk
|
|
|
|
:: ::
|
|
|
|
:: ++ get-apps-have
|
|
|
|
:: |= [our=ship =desk now=@da]
|
|
|
|
:: ^- (list [=dude live=?])
|
|
|
|
:: %~ tap in
|
|
|
|
:: .^((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]
|
|
|
|
:: ^- (list dude)
|
|
|
|
:: ?. liv.rein ~
|
|
|
|
:: ?. |(=(`zuse+zuse (read-kelvin-local local)) =(%base desk.local)) ~
|
|
|
|
:: =. duz (skip duz ~(has in sub.rein))
|
|
|
|
:: =. duz (weld duz (skip ~(tap in add.rein) ~(has in (sy duz))))
|
|
|
|
:: duz
|
|
|
|
:: ::
|
|
|
|
:: ++ mergebase-hashes
|
|
|
|
:: |= [our=@p =desk now=@da =arak]
|
|
|
|
:: ?~ rail.arak
|
|
|
|
:: ~
|
|
|
|
:: =/ her (scot %p ship.u.rail.arak)
|
|
|
|
:: =/ ego (scot %p our)
|
|
|
|
:: =/ wen (scot %da now)
|
|
|
|
:: %+ turn .^((list tako) %cs ~[ego desk wen %base her desk.u.rail.arak])
|
|
|
|
:: |=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
|
|
|
++ enjs
|
|
|
|
=, enjs:format
|
|
|
|
|%
|
2022-08-26 08:57:20 +03:00
|
|
|
:: XX
|
|
|
|
:: ++ vats
|
|
|
|
:: |= v=(list ^vat)
|
|
|
|
:: ^- json
|
|
|
|
:: %- pairs
|
|
|
|
:: %+ turn v
|
|
|
|
:: |= va=^vat
|
|
|
|
:: [desk.va (vat va)]
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
|
|
|
++ tim
|
|
|
|
|= t=@
|
|
|
|
^- json
|
|
|
|
(numb (fall (mole |.((unm:chrono:userlib t))) 0))
|
|
|
|
::
|
|
|
|
++ cass
|
|
|
|
|= c=^cass
|
|
|
|
%- pairs
|
|
|
|
:~ ud+(numb ud.c)
|
|
|
|
da+(tim da.c)
|
|
|
|
==
|
|
|
|
::
|
2022-08-26 08:57:20 +03:00
|
|
|
:: XX
|
|
|
|
:: ++ vat
|
|
|
|
:: |= v=^vat
|
|
|
|
:: %- pairs
|
|
|
|
:: :~ desk+s+desk.v
|
|
|
|
:: hash+s+(scot %uv hash.v)
|
|
|
|
:: cass+(cass cass.v)
|
|
|
|
:: arak+(arak arak.v)
|
|
|
|
:: ==
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
|
|
|
++ weft
|
|
|
|
|= w=^weft
|
|
|
|
%- pairs
|
|
|
|
:~ name+s+lal.w
|
|
|
|
kelvin+(numb num.w)
|
|
|
|
==
|
|
|
|
::
|
2021-09-07 07:37:36 +03:00
|
|
|
++ rung
|
|
|
|
|= r=^rung
|
2021-09-02 00:37:56 +03:00
|
|
|
%- pairs
|
2021-09-07 07:37:36 +03:00
|
|
|
:~ aeon+(numb aeon.r)
|
|
|
|
weft+(weft weft.r)
|
2021-09-02 00:37:56 +03:00
|
|
|
==
|
|
|
|
::
|
2022-08-26 08:57:20 +03:00
|
|
|
:: XX
|
|
|
|
:: ++ rein
|
|
|
|
:: |= r=^rein
|
|
|
|
:: %- pairs
|
|
|
|
:: :~ add+a+(turn ~(tap in add.r) (lead %s))
|
|
|
|
:: sub+a+(turn ~(tap in sub.r) (lead %s))
|
|
|
|
:: ==
|
2021-09-02 00:37:56 +03:00
|
|
|
::
|
|
|
|
--
|
|
|
|
--
|