mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 16:05:27 +03:00
%garden-dev desk; also cleaned up %base-dev
This commit is contained in:
parent
63fac6bec2
commit
f3e15396f3
@ -1 +0,0 @@
|
||||
../../base-dev/lib/docket.hoon
|
@ -1 +0,0 @@
|
||||
../../base-dev/mar/docket.hoon
|
@ -1 +0,0 @@
|
||||
../../base-dev/sur/docket.hoon
|
@ -1,218 +0,0 @@
|
||||
/- *bill
|
||||
=, clay
|
||||
=* dude dude:gall
|
||||
|%
|
||||
:: $diff: subscription update
|
||||
::
|
||||
+$ diff
|
||||
$% [%block =desk =arak =weft blockers=(set desk)]
|
||||
[%reset =desk =arak]
|
||||
[%merge =desk =arak]
|
||||
[%merge-sunk =desk =arak =tang]
|
||||
[%merge-fail =desk =arak =tang]
|
||||
[%suspend =desk =arak]
|
||||
[%revive =desk =arak]
|
||||
==
|
||||
:: $arak: foreign vat tracker
|
||||
::
|
||||
:: .next is a list of pending commits with future kelvins
|
||||
::
|
||||
+$ arak
|
||||
$: =ship
|
||||
=desk
|
||||
=aeon
|
||||
next=(list [=aeon =weft])
|
||||
=rein
|
||||
==
|
||||
:: $rein: diff from desk manifest
|
||||
::
|
||||
:: .liv: suspended?
|
||||
:: .add: agents not in manifest that should be running
|
||||
:: .sub: agents in manifest that should not be running
|
||||
::
|
||||
+$ rein
|
||||
$: liv=_&
|
||||
add=(set dude)
|
||||
sub=(set dude)
|
||||
==
|
||||
::
|
||||
+$ 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
|
||||
==
|
||||
(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
|
||||
=+ .^(=weft %cx /(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
|
||||
:+ %rose ["" "{<desk>}" "::"]
|
||||
^- tang
|
||||
=- ?: =(~ next.arak) -
|
||||
%+ snoc -
|
||||
leaf/"pending: {<(turn next.arak |=([@ lal=@tas num=@] [lal num]))>}"
|
||||
^- tang
|
||||
=/ meb (mergebase-hashes our desk now arak)
|
||||
=/ sat ?:(liv.rein.arak "running" "suspended")
|
||||
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
||||
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
||||
leaf/"%cz hash: {<hash>}"
|
||||
leaf/"source ship: {<ship.arak>}"
|
||||
leaf/"source desk: {<desk.arak>}"
|
||||
leaf/"source aeon: {<aeon.arak>}"
|
||||
leaf/"status: {sat}"
|
||||
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
||||
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
||||
==
|
||||
:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
|
||||
::
|
||||
++ read-kelvin-foreign
|
||||
|= [=ship =desk =aeon]
|
||||
^- weft
|
||||
=/ 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))
|
||||
=/ bob .^(blob cs/~[her syd yon %blob lob])
|
||||
::
|
||||
;; weft
|
||||
?- -.bob
|
||||
%direct q.q.bob
|
||||
%delta q.r.bob
|
||||
==
|
||||
:: +read-kelvin-local: read /sys/kelvin from a local desk
|
||||
::
|
||||
++ read-kelvin-local
|
||||
|= [our=ship =desk now=@da]
|
||||
^- (unit weft)
|
||||
=/ pax (en-beam [our desk da+now] /sys/kelvin)
|
||||
?~ =<(fil .^(arch cy/pax))
|
||||
~
|
||||
[~ .^(weft cx/pax)]
|
||||
:: +read-bill: read contents of /desk/bill manifest
|
||||
::
|
||||
++ read-bill
|
||||
|= [our=ship =desk now=@da]
|
||||
=/ pax (en-beam [our desk da+now] /desk/bill)
|
||||
?~ =<(fil .^(arch cy/pax))
|
||||
*bill
|
||||
.^(bill cx/pax)
|
||||
:: +is-fish: should dill link .dude?
|
||||
::
|
||||
++ is-fish |=([=dude =bill] .?((find ~[dude] (read-fish bill))))
|
||||
:: +get-apps-diff: which agents should be started and stopped
|
||||
::
|
||||
++ get-apps-diff
|
||||
|= [our=ship =desk now=@da =rein]
|
||||
^- [liv=(list dude) ded=(list dude)]
|
||||
=/ =bill (read-bill our desk now)
|
||||
=/ wan (sy (get-apps-want bill rein))
|
||||
=/ hav (sy (get-apps-live our desk now))
|
||||
=/ liv ~(tap in (~(dif in wan) hav))
|
||||
=/ ded ~(tap in (~(dif in hav) wan))
|
||||
[liv ded]
|
||||
::
|
||||
++ 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
|
||||
|= [=bill =rein]
|
||||
^- (list dude)
|
||||
=/ duz (read-apes bill)
|
||||
=. 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]
|
||||
=/ her (scot %p ship.arak)
|
||||
=/ ego (scot %p our)
|
||||
=/ wen (scot %da now)
|
||||
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.arak])
|
||||
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
||||
::
|
||||
++ enjs
|
||||
=, enjs:format
|
||||
|%
|
||||
++ vats
|
||||
|= v=(list ^vat)
|
||||
^- json
|
||||
%- pairs
|
||||
%+ turn v
|
||||
|= va=^vat
|
||||
[desk.va (vat va)]
|
||||
::
|
||||
++ tim
|
||||
|= t=@
|
||||
^- json
|
||||
(numb (fall (mole |.((unm:chrono:userlib t))) 0))
|
||||
::
|
||||
++ cass
|
||||
|= c=^cass
|
||||
%- pairs
|
||||
:~ ud+(numb ud.c)
|
||||
da+(tim da.c)
|
||||
==
|
||||
::
|
||||
++ vat
|
||||
|= v=^vat
|
||||
%- pairs
|
||||
:~ desk+s+desk.v
|
||||
hash+s+(scot %uv hash.v)
|
||||
cass+(cass cass.v)
|
||||
arak+(arak arak.v)
|
||||
==
|
||||
::
|
||||
++ weft
|
||||
|= w=^weft
|
||||
%- pairs
|
||||
:~ name+s+lal.w
|
||||
kelvin+(numb num.w)
|
||||
==
|
||||
::
|
||||
++ woof
|
||||
|= w=[=aeon =^weft]
|
||||
%- pairs
|
||||
:~ aeon+(numb aeon.w)
|
||||
weft+(weft weft.w)
|
||||
==
|
||||
::
|
||||
++ rein
|
||||
|= r=^rein
|
||||
%- pairs
|
||||
:~ add+a+(turn ~(tap in add.r) (lead %s))
|
||||
sub+a+(turn ~(tap in sub.r) (lead %s))
|
||||
==
|
||||
::
|
||||
++ arak
|
||||
|= a=^arak
|
||||
%- pairs
|
||||
:~ ship+s+(scot %p ship.a)
|
||||
desk+s+desk.a
|
||||
aeon+(numb aeon.a)
|
||||
next+a+(turn next.a woof)
|
||||
rein+(rein rein.a)
|
||||
==
|
||||
--
|
||||
--
|
1
pkg/arvo/sur/hood.hoon
Symbolic link
1
pkg/arvo/sur/hood.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/hood.hoon
|
218
pkg/base-dev/sur/hood.hoon
Normal file
218
pkg/base-dev/sur/hood.hoon
Normal file
@ -0,0 +1,218 @@
|
||||
/- *bill
|
||||
=, clay
|
||||
=* dude dude:gall
|
||||
|%
|
||||
:: $diff: subscription update
|
||||
::
|
||||
+$ diff
|
||||
$% [%block =desk =arak =weft blockers=(set desk)]
|
||||
[%reset =desk =arak]
|
||||
[%merge =desk =arak]
|
||||
[%merge-sunk =desk =arak =tang]
|
||||
[%merge-fail =desk =arak =tang]
|
||||
[%suspend =desk =arak]
|
||||
[%revive =desk =arak]
|
||||
==
|
||||
:: $arak: foreign vat tracker
|
||||
::
|
||||
:: .next is a list of pending commits with future kelvins
|
||||
::
|
||||
+$ arak
|
||||
$: =ship
|
||||
=desk
|
||||
=aeon
|
||||
next=(list [=aeon =weft])
|
||||
=rein
|
||||
==
|
||||
:: $rein: diff from desk manifest
|
||||
::
|
||||
:: .liv: suspended?
|
||||
:: .add: agents not in manifest that should be running
|
||||
:: .sub: agents in manifest that should not be running
|
||||
::
|
||||
+$ rein
|
||||
$: liv=_&
|
||||
add=(set dude)
|
||||
sub=(set dude)
|
||||
==
|
||||
::
|
||||
+$ 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
|
||||
==
|
||||
(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
|
||||
=+ .^(=weft %cx /(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
|
||||
:+ %rose ["" "{<desk>}" "::"]
|
||||
^- tang
|
||||
=- ?: =(~ next.arak) -
|
||||
%+ snoc -
|
||||
leaf/"pending: {<(turn next.arak |=([@ lal=@tas num=@] [lal num]))>}"
|
||||
^- tang
|
||||
=/ meb (mergebase-hashes our desk now arak)
|
||||
=/ sat ?:(liv.rein.arak "running" "suspended")
|
||||
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
||||
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
||||
leaf/"%cz hash: {<hash>}"
|
||||
leaf/"source ship: {<ship.arak>}"
|
||||
leaf/"source desk: {<desk.arak>}"
|
||||
leaf/"source aeon: {<aeon.arak>}"
|
||||
leaf/"status: {sat}"
|
||||
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
||||
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
||||
==
|
||||
:: +read-kelvin-foreign: read /sys/kelvin from a foreign desk
|
||||
::
|
||||
++ read-kelvin-foreign
|
||||
|= [=ship =desk =aeon]
|
||||
^- weft
|
||||
=/ 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))
|
||||
=/ bob .^(blob cs/~[her syd yon %blob lob])
|
||||
::
|
||||
;; weft
|
||||
?- -.bob
|
||||
%direct q.q.bob
|
||||
%delta q.r.bob
|
||||
==
|
||||
:: +read-kelvin-local: read /sys/kelvin from a local desk
|
||||
::
|
||||
++ read-kelvin-local
|
||||
|= [our=ship =desk now=@da]
|
||||
^- (unit weft)
|
||||
=/ pax (en-beam [our desk da+now] /sys/kelvin)
|
||||
?~ =<(fil .^(arch cy/pax))
|
||||
~
|
||||
[~ .^(weft cx/pax)]
|
||||
:: +read-bill: read contents of /desk/bill manifest
|
||||
::
|
||||
++ read-bill
|
||||
|= [our=ship =desk now=@da]
|
||||
=/ pax (en-beam [our desk da+now] /desk/bill)
|
||||
?~ =<(fil .^(arch cy/pax))
|
||||
*bill
|
||||
.^(bill cx/pax)
|
||||
:: +is-fish: should dill link .dude?
|
||||
::
|
||||
++ is-fish |=([=dude =bill] .?((find ~[dude] (read-fish bill))))
|
||||
:: +get-apps-diff: which agents should be started and stopped
|
||||
::
|
||||
++ get-apps-diff
|
||||
|= [our=ship =desk now=@da =rein]
|
||||
^- [liv=(list dude) ded=(list dude)]
|
||||
=/ =bill (read-bill our desk now)
|
||||
=/ wan (sy (get-apps-want bill rein))
|
||||
=/ hav (sy (get-apps-live our desk now))
|
||||
=/ liv ~(tap in (~(dif in wan) hav))
|
||||
=/ ded ~(tap in (~(dif in hav) wan))
|
||||
[liv ded]
|
||||
::
|
||||
++ 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
|
||||
|= [=bill =rein]
|
||||
^- (list dude)
|
||||
=/ duz (read-apes bill)
|
||||
=. 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]
|
||||
=/ her (scot %p ship.arak)
|
||||
=/ ego (scot %p our)
|
||||
=/ wen (scot %da now)
|
||||
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.arak])
|
||||
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
||||
::
|
||||
++ enjs
|
||||
=, enjs:format
|
||||
|%
|
||||
++ vats
|
||||
|= v=(list ^vat)
|
||||
^- json
|
||||
%- pairs
|
||||
%+ turn v
|
||||
|= va=^vat
|
||||
[desk.va (vat va)]
|
||||
::
|
||||
++ tim
|
||||
|= t=@
|
||||
^- json
|
||||
(numb (fall (mole |.((unm:chrono:userlib t))) 0))
|
||||
::
|
||||
++ cass
|
||||
|= c=^cass
|
||||
%- pairs
|
||||
:~ ud+(numb ud.c)
|
||||
da+(tim da.c)
|
||||
==
|
||||
::
|
||||
++ vat
|
||||
|= v=^vat
|
||||
%- pairs
|
||||
:~ desk+s+desk.v
|
||||
hash+s+(scot %uv hash.v)
|
||||
cass+(cass cass.v)
|
||||
arak+(arak arak.v)
|
||||
==
|
||||
::
|
||||
++ weft
|
||||
|= w=^weft
|
||||
%- pairs
|
||||
:~ name+s+lal.w
|
||||
kelvin+(numb num.w)
|
||||
==
|
||||
::
|
||||
++ woof
|
||||
|= w=[=aeon =^weft]
|
||||
%- pairs
|
||||
:~ aeon+(numb aeon.w)
|
||||
weft+(weft weft.w)
|
||||
==
|
||||
::
|
||||
++ rein
|
||||
|= r=^rein
|
||||
%- pairs
|
||||
:~ add+a+(turn ~(tap in add.r) (lead %s))
|
||||
sub+a+(turn ~(tap in sub.r) (lead %s))
|
||||
==
|
||||
::
|
||||
++ arak
|
||||
|= a=^arak
|
||||
%- pairs
|
||||
:~ ship+s+(scot %p ship.a)
|
||||
desk+s+desk.a
|
||||
aeon+(numb aeon.a)
|
||||
next+a+(turn next.a woof)
|
||||
rein+(rein rein.a)
|
||||
==
|
||||
--
|
||||
--
|
1
pkg/garden/lib/agentio.hoon
Symbolic link
1
pkg/garden/lib/agentio.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/agentio.hoon
|
1
pkg/garden/lib/azimuth.hoon
Symbolic link
1
pkg/garden/lib/azimuth.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/azimuth.hoon
|
1
pkg/garden/lib/azimuthio.hoon
Symbolic link
1
pkg/garden/lib/azimuthio.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/azimuthio.hoon
|
1
pkg/garden/lib/bip/b158.hoon
Symbolic link
1
pkg/garden/lib/bip/b158.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/bip/b158.hoon
|
1
pkg/garden/lib/bip/b173.hoon
Symbolic link
1
pkg/garden/lib/bip/b173.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/bip/b173.hoon
|
1
pkg/garden/lib/bip/b174.hoon
Symbolic link
1
pkg/garden/lib/bip/b174.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/bip/b174.hoon
|
1
pkg/garden/lib/bip32.hoon
Symbolic link
1
pkg/garden/lib/bip32.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/bip32.hoon
|
1
pkg/garden/lib/bip39.hoon
Symbolic link
1
pkg/garden/lib/bip39.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/bip39.hoon
|
1
pkg/garden/lib/bip39/english.hoon
Symbolic link
1
pkg/garden/lib/bip39/english.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/bip39/english.hoon
|
1
pkg/garden/lib/dbug.hoon
Symbolic link
1
pkg/garden/lib/dbug.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/dbug.hoon
|
1
pkg/garden/lib/default-agent.hoon
Symbolic link
1
pkg/garden/lib/default-agent.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/default-agent.hoon
|
1
pkg/garden/lib/docket.hoon
Symbolic link
1
pkg/garden/lib/docket.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../garden-dev/lib/docket.hoon
|
1
pkg/garden/lib/ethio.hoon
Symbolic link
1
pkg/garden/lib/ethio.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/ethio.hoon
|
1
pkg/garden/lib/language-server/build.hoon
Symbolic link
1
pkg/garden/lib/language-server/build.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/build.hoon
|
1
pkg/garden/lib/language-server/complete.hoon
Symbolic link
1
pkg/garden/lib/language-server/complete.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/complete.hoon
|
1
pkg/garden/lib/language-server/easy-print.hoon
Symbolic link
1
pkg/garden/lib/language-server/easy-print.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/easy-print.hoon
|
1
pkg/garden/lib/language-server/json.hoon
Symbolic link
1
pkg/garden/lib/language-server/json.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/json.hoon
|
1
pkg/garden/lib/language-server/parser.hoon
Symbolic link
1
pkg/garden/lib/language-server/parser.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/parser.hoon
|
1
pkg/garden/lib/language-server/rune-snippet.hoon
Symbolic link
1
pkg/garden/lib/language-server/rune-snippet.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/lib/language-server/rune-snippet.hoon
|
1
pkg/garden/lib/server.hoon
Symbolic link
1
pkg/garden/lib/server.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/server.hoon
|
1
pkg/garden/lib/shoe.hoon
Symbolic link
1
pkg/garden/lib/shoe.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/shoe.hoon
|
1
pkg/garden/lib/skeleton.hoon
Symbolic link
1
pkg/garden/lib/skeleton.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/skeleton.hoon
|
1
pkg/garden/lib/sole.hoon
Symbolic link
1
pkg/garden/lib/sole.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/sole.hoon
|
1
pkg/garden/lib/strand.hoon
Symbolic link
1
pkg/garden/lib/strand.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/strand.hoon
|
1
pkg/garden/lib/strandio.hoon
Symbolic link
1
pkg/garden/lib/strandio.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/strandio.hoon
|
1
pkg/garden/lib/treaty.hoon
Symbolic link
1
pkg/garden/lib/treaty.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/treaty.hoon
|
1
pkg/garden/lib/verb.hoon
Symbolic link
1
pkg/garden/lib/verb.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/lib/verb.hoon
|
1
pkg/garden/mar/belt.hoon
Symbolic link
1
pkg/garden/mar/belt.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/belt.hoon
|
1
pkg/garden/mar/bill.hoon
Symbolic link
1
pkg/garden/mar/bill.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/bill.hoon
|
1
pkg/garden/mar/blit.hoon
Symbolic link
1
pkg/garden/mar/blit.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/blit.hoon
|
@ -1,25 +0,0 @@
|
||||
/+ dock=docket
|
||||
|_ =docket:dock
|
||||
++ grow
|
||||
|%
|
||||
++ mime
|
||||
^- ^mime
|
||||
[/text/x-docket (as-octt:mimes:html (spit-docket:mime:dock docket))]
|
||||
++ noun docket
|
||||
++ json (docket:enjs:dock docket)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
::
|
||||
++ mime
|
||||
|= [=mite len=@ud tex=@]
|
||||
^- docket:dock
|
||||
%- need
|
||||
%- from-clauses:mime:dock
|
||||
!<((list clause:dock) (slap !>(~) (ream tex)))
|
||||
|
||||
::
|
||||
++ noun docket:dock
|
||||
--
|
||||
++ grad %noun
|
||||
--
|
1
pkg/garden/mar/docket.hoon
Symbolic link
1
pkg/garden/mar/docket.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../garden-dev/mar/docket.hoon
|
1
pkg/garden/mar/hoon.hoon
Symbolic link
1
pkg/garden/mar/hoon.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/hoon.hoon
|
1
pkg/garden/mar/htm.hoon
Symbolic link
1
pkg/garden/mar/htm.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/htm.hoon
|
1
pkg/garden/mar/html.hoon
Symbolic link
1
pkg/garden/mar/html.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/html.hoon
|
1
pkg/garden/mar/httr.hoon
Symbolic link
1
pkg/garden/mar/httr.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/httr.hoon
|
1
pkg/garden/mar/hymn.hoon
Symbolic link
1
pkg/garden/mar/hymn.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/hymn.hoon
|
1
pkg/garden/mar/js.hoon
Symbolic link
1
pkg/garden/mar/js.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/js.hoon
|
1
pkg/garden/mar/json.hoon
Symbolic link
1
pkg/garden/mar/json.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/json.hoon
|
1
pkg/garden/mar/json/rpc/response.hoon
Symbolic link
1
pkg/garden/mar/json/rpc/response.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../base-dev/mar/json/rpc/response.hoon
|
1
pkg/garden/mar/kelvin.hoon
Symbolic link
1
pkg/garden/mar/kelvin.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/kelvin.hoon
|
1
pkg/garden/mar/language-server/rpc/notification.hoon
Symbolic link
1
pkg/garden/mar/language-server/rpc/notification.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../base-dev/mar/language-server/rpc/notification.hoon
|
1
pkg/garden/mar/language-server/rpc/request.hoon
Symbolic link
1
pkg/garden/mar/language-server/rpc/request.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../base-dev/mar/language-server/rpc/request.hoon
|
1
pkg/garden/mar/language-server/rpc/response.hoon
Symbolic link
1
pkg/garden/mar/language-server/rpc/response.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../base-dev/mar/language-server/rpc/response.hoon
|
1
pkg/garden/mar/mime.hoon
Symbolic link
1
pkg/garden/mar/mime.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/mime.hoon
|
1
pkg/garden/mar/noun.hoon
Symbolic link
1
pkg/garden/mar/noun.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/noun.hoon
|
1
pkg/garden/mar/path.hoon
Symbolic link
1
pkg/garden/mar/path.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/path.hoon
|
1
pkg/garden/mar/png.hoon
Symbolic link
1
pkg/garden/mar/png.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/png.hoon
|
1
pkg/garden/mar/purl.hoon
Symbolic link
1
pkg/garden/mar/purl.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/purl.hoon
|
1
pkg/garden/mar/sole/action.hoon
Symbolic link
1
pkg/garden/mar/sole/action.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/mar/sole/action.hoon
|
1
pkg/garden/mar/sole/effect.hoon
Symbolic link
1
pkg/garden/mar/sole/effect.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../../base-dev/mar/sole/effect.hoon
|
1
pkg/garden/mar/svg.hoon
Symbolic link
1
pkg/garden/mar/svg.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/svg.hoon
|
1
pkg/garden/mar/tang.hoon
Symbolic link
1
pkg/garden/mar/tang.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/tang.hoon
|
1
pkg/garden/mar/tape.hoon
Symbolic link
1
pkg/garden/mar/tape.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/tape.hoon
|
1
pkg/garden/mar/txt-diff.hoon
Symbolic link
1
pkg/garden/mar/txt-diff.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/txt-diff.hoon
|
1
pkg/garden/mar/txt.hoon
Symbolic link
1
pkg/garden/mar/txt.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/txt.hoon
|
1
pkg/garden/mar/udon.hoon
Symbolic link
1
pkg/garden/mar/udon.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/udon.hoon
|
1
pkg/garden/mar/umd.hoon
Symbolic link
1
pkg/garden/mar/umd.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/umd.hoon
|
1
pkg/garden/mar/urb.hoon
Symbolic link
1
pkg/garden/mar/urb.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/urb.hoon
|
1
pkg/garden/mar/urbit.hoon
Symbolic link
1
pkg/garden/mar/urbit.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/urbit.hoon
|
1
pkg/garden/mar/woff2.hoon
Symbolic link
1
pkg/garden/mar/woff2.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/woff2.hoon
|
1
pkg/garden/mar/xml.hoon
Symbolic link
1
pkg/garden/mar/xml.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/mar/xml.hoon
|
1
pkg/garden/sur/bill.hoon
Symbolic link
1
pkg/garden/sur/bill.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/bill.hoon
|
1
pkg/garden/sur/docket.hoon
Symbolic link
1
pkg/garden/sur/docket.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../garden-dev/sur/docket.hoon
|
@ -1,206 +0,0 @@
|
||||
/- *bill
|
||||
=, clay
|
||||
=* dude dude:gall
|
||||
|%
|
||||
:: $diff: subscription update
|
||||
::
|
||||
+$ diff
|
||||
$% [%block =desk =arak =weft blockers=(set desk)]
|
||||
[%reset =desk =arak]
|
||||
[%merge =desk =arak]
|
||||
[%merge-sunk =desk =arak =tang]
|
||||
[%merge-fail =desk =arak =tang]
|
||||
[%suspend =desk =arak]
|
||||
[%revive =desk =arak]
|
||||
==
|
||||
:: $arak: foreign vat tracker
|
||||
::
|
||||
:: .next is a list of pending commits with future kelvins
|
||||
::
|
||||
+$ arak
|
||||
$: =ship
|
||||
=desk
|
||||
=aeon
|
||||
next=(list [=aeon =weft])
|
||||
=rein
|
||||
==
|
||||
:: $rein: diff from desk manifest
|
||||
::
|
||||
:: .liv: suspended?
|
||||
:: .add: agents not in manifest that should be running
|
||||
:: .sub: agents in manifest that should not be running
|
||||
::
|
||||
+$ rein
|
||||
$: liv=_&
|
||||
add=(set dude)
|
||||
sub=(set dude)
|
||||
==
|
||||
::
|
||||
+$ 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
|
||||
==
|
||||
(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
|
||||
=+ .^(=weft %cx /(scot %p our)/[desk]/(scot %da now)/sys/kelvin)
|
||||
:+ %rose ["" "{<desk>}" "::"]
|
||||
^- tang
|
||||
=- ?: =(~ next.arak) -
|
||||
%+ snoc -
|
||||
leaf/"pending: {<(turn next.arak |=([@ lal=@tas num=@] [lal num]))>}"
|
||||
^- tang
|
||||
=/ meb (mergebase-hashes our desk now arak)
|
||||
=/ sat ?:(liv.rein.arak "running" "suspended")
|
||||
:~ leaf/"/sys/kelvin: {<[lal num]:weft>}"
|
||||
leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
|
||||
leaf/"%cz hash: {<hash>}"
|
||||
leaf/"remote aeon: {<aeon.arak>}"
|
||||
leaf/"status: {sat}"
|
||||
leaf/"force on: {?:(=(~ add.rein.arak) "~" <add.rein.arak>)}"
|
||||
leaf/"force off: {?:(=(~ sub.rein.arak) "~" <sub.rein.arak>)}"
|
||||
==
|
||||
::
|
||||
++ read-kelvin-foreign
|
||||
|= [=ship =desk =aeon]
|
||||
^- weft
|
||||
=/ 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))
|
||||
=/ bob .^(blob cs/~[her syd yon %blob lob])
|
||||
::
|
||||
;; weft
|
||||
?- -.bob
|
||||
%direct q.q.bob
|
||||
%delta q.r.bob
|
||||
==
|
||||
:: +read-bill: read contents of /desk/bill manifest
|
||||
::
|
||||
++ read-bill
|
||||
|= [our=ship =desk now=@da]
|
||||
=/ pax (en-beam [our desk da+now] /desk/bill)
|
||||
?~ =<(fil .^(arch cy/pax))
|
||||
*bill
|
||||
.^(bill cx/pax)
|
||||
:: +is-fish: should dill link .dude?
|
||||
::
|
||||
++ is-fish |=([=dude =bill] .?((find ~[dude] (read-fish bill))))
|
||||
:: +get-apps-diff: which agents should be started and stopped
|
||||
::
|
||||
++ get-apps-diff
|
||||
|= [our=ship =desk now=@da =rein]
|
||||
^- [liv=(list dude) ded=(list dude)]
|
||||
=/ =bill (read-bill our desk now)
|
||||
=/ wan (sy (get-apps-want bill rein))
|
||||
=/ hav (sy (get-apps-live our desk now))
|
||||
=/ liv ~(tap in (~(dif in wan) hav))
|
||||
=/ ded ~(tap in (~(dif in hav) wan))
|
||||
[liv ded]
|
||||
::
|
||||
++ 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
|
||||
|= [=bill =rein]
|
||||
^- (list dude)
|
||||
=/ duz (read-apes bill)
|
||||
=. 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]
|
||||
=/ her (scot %p ship.arak)
|
||||
=/ ego (scot %p our)
|
||||
=/ wen (scot %da now)
|
||||
%+ turn .^((list tako) %cs ~[ego desk wen %base her desk.arak])
|
||||
|=(=tako .^(@uv %cs ~[ego desk wen %hash (scot %uv tako)]))
|
||||
::
|
||||
++ enjs
|
||||
=, enjs:format
|
||||
|%
|
||||
++ vats
|
||||
|= v=(list ^vat)
|
||||
^- json
|
||||
%- pairs
|
||||
%+ turn v
|
||||
|= va=^vat
|
||||
[desk.va (vat va)]
|
||||
::
|
||||
++ tim
|
||||
|= t=@
|
||||
^- json
|
||||
(numb (fall (mole |.((unm:chrono:userlib t))) 0))
|
||||
::
|
||||
++ cass
|
||||
|= c=^cass
|
||||
%- pairs
|
||||
:~ ud+(numb ud.c)
|
||||
da+(tim da.c)
|
||||
==
|
||||
::
|
||||
++ vat
|
||||
|= v=^vat
|
||||
%- pairs
|
||||
:~ desk+s+desk.v
|
||||
hash+s+(scot %uv hash.v)
|
||||
cass+(cass cass.v)
|
||||
arak+(arak arak.v)
|
||||
==
|
||||
::
|
||||
++ weft
|
||||
|= w=^weft
|
||||
%- pairs
|
||||
:~ name+s+lal.w
|
||||
kelvin+(numb num.w)
|
||||
==
|
||||
::
|
||||
++ woof
|
||||
|= w=[=aeon =^weft]
|
||||
%- pairs
|
||||
:~ aeon+(numb aeon.w)
|
||||
weft+(weft weft.w)
|
||||
==
|
||||
::
|
||||
++ rein
|
||||
|= r=^rein
|
||||
%- pairs
|
||||
:~ add+a+(turn ~(tap in add.r) (lead %s))
|
||||
sub+a+(turn ~(tap in sub.r) (lead %s))
|
||||
==
|
||||
::
|
||||
++ arak
|
||||
|= a=^arak
|
||||
%- pairs
|
||||
:~ ship+s+(scot %p ship.a)
|
||||
desk+s+desk.a
|
||||
aeon+(numb aeon.a)
|
||||
next+a+(turn next.a woof)
|
||||
rein+(rein rein.a)
|
||||
==
|
||||
--
|
||||
--
|
1
pkg/garden/sur/hood.hoon
Symbolic link
1
pkg/garden/sur/hood.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/hood.hoon
|
1
pkg/garden/sur/sole.hoon
Symbolic link
1
pkg/garden/sur/sole.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/sole.hoon
|
1
pkg/garden/sur/spider.hoon
Symbolic link
1
pkg/garden/sur/spider.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/spider.hoon
|
1
pkg/garden/sur/verb.hoon
Symbolic link
1
pkg/garden/sur/verb.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../base-dev/sur/verb.hoon
|
Loading…
Reference in New Issue
Block a user