2020-06-17 09:36:09 +03:00
|
|
|
/+ pill
|
2020-06-16 10:29:17 +03:00
|
|
|
=* card card:agent:gall
|
|
|
|
|%
|
2020-06-17 10:54:27 +03:00
|
|
|
+$ any-state $%(state state-0)
|
2020-06-16 10:29:17 +03:00
|
|
|
+$ state
|
2020-06-17 09:36:09 +03:00
|
|
|
$: %1
|
|
|
|
mass-timer=[way=wire nex=@da tim=@dr]
|
|
|
|
==
|
2020-06-17 10:54:27 +03:00
|
|
|
+$ state-0 [%0 hoc=(map bone session-0)]
|
|
|
|
+$ session-0
|
|
|
|
$: say=*
|
2020-06-17 09:36:09 +03:00
|
|
|
mud=*
|
|
|
|
mass-timer=[way=wire nex=@da tim=@dr]
|
2020-06-16 10:29:17 +03:00
|
|
|
==
|
2019-11-14 21:39:50 +03:00
|
|
|
::
|
2020-06-17 09:36:09 +03:00
|
|
|
++ state-0-to-1
|
|
|
|
|= s=state-0
|
|
|
|
^- state
|
2020-06-17 10:54:27 +03:00
|
|
|
[%1 mass-timer:(~(got by hoc.s) 0)]
|
2020-06-17 09:36:09 +03:00
|
|
|
--
|
2020-06-17 10:54:27 +03:00
|
|
|
|= [=bowl:gall sat=state]
|
2020-06-16 10:29:17 +03:00
|
|
|
=| moz=(list card)
|
|
|
|
|%
|
2020-06-17 10:54:27 +03:00
|
|
|
++ this .
|
|
|
|
+$ state ^state :: proxy
|
|
|
|
+$ any-state ^any-state :: proxy
|
|
|
|
++ abet [(flop moz) sat]
|
2020-06-16 10:29:17 +03:00
|
|
|
++ flog |=(=flog:dill (emit %pass /di %arvo %d %flog flog))
|
|
|
|
++ emit |=(card this(moz [+< moz]))
|
|
|
|
:: +emil: emit multiple cards
|
2019-11-14 21:39:50 +03:00
|
|
|
::
|
2020-06-16 10:29:17 +03:00
|
|
|
++ emil
|
|
|
|
|= caz=(list card)
|
|
|
|
^+ this
|
|
|
|
?~(caz this $(caz t.caz, this (emit i.caz)))
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2020-06-17 09:36:09 +03:00
|
|
|
++ on-load
|
2020-07-18 02:58:28 +03:00
|
|
|
|= [hood-version=@ud old=any-state]
|
2020-06-17 09:36:09 +03:00
|
|
|
=< abet
|
|
|
|
=? old ?=(%0 -.old) (state-0-to-1 old)
|
|
|
|
?> ?=(%1 -.old)
|
2020-06-17 10:54:27 +03:00
|
|
|
this(sat old)
|
2020-06-17 09:36:09 +03:00
|
|
|
::
|
2018-10-18 21:10:36 +03:00
|
|
|
++ poke-rekey :: rotate private keys
|
|
|
|
|= des=@t
|
|
|
|
=/ sed=(unit seed:able:jael)
|
|
|
|
%+ biff
|
|
|
|
(bind (slaw %uw des) cue)
|
|
|
|
(soft seed:able:jael)
|
|
|
|
=< abet
|
|
|
|
?~ sed
|
|
|
|
~& %invalid-private-key
|
2020-06-16 10:29:17 +03:00
|
|
|
this
|
2020-06-17 10:54:27 +03:00
|
|
|
?. =(our.bowl who.u.sed)
|
2018-10-18 21:10:36 +03:00
|
|
|
~& [%wrong-private-key-ship who.u.sed]
|
2020-06-16 10:29:17 +03:00
|
|
|
this
|
2019-11-14 21:39:50 +03:00
|
|
|
(emit %pass / %arvo %j %rekey lyf.u.sed key.u.sed)
|
2019-08-08 03:36:25 +03:00
|
|
|
::
|
2020-06-17 09:36:09 +03:00
|
|
|
++ ames-secret
|
|
|
|
^- @t
|
|
|
|
=; pax (crip +:<.^(@p %j pax)>)
|
|
|
|
/(scot %p our.bowl)/code/(scot %da now.bowl)/(scot %p our.bowl)
|
|
|
|
::
|
|
|
|
++ poke-sec-atom
|
|
|
|
|= [hot=host:eyre dat=@]
|
|
|
|
?> ?=(%& -.hot)
|
|
|
|
=. p.hot (scag 2 p.hot) :: ignore subdomain
|
|
|
|
=. dat (scot %uw (en:crub:crypto ames-secret dat))
|
|
|
|
=- abet:(emit %pass /write %arvo %c %info -)
|
|
|
|
=/ byk=path (en-beam:format byk.bowl(r da+now.bowl) ~)
|
|
|
|
=+ .^(=tube:clay cc+(welp byk /mime/atom))
|
|
|
|
=/ =cage atom+(tube !>([/ (as-octs:mimes:html dat)]))
|
2020-06-17 10:54:27 +03:00
|
|
|
(foal:space:userlib :(welp byk sec+p.hot /atom) cage)
|
2020-06-17 09:36:09 +03:00
|
|
|
::
|
2019-08-08 03:36:25 +03:00
|
|
|
++ poke-moon :: rotate moon keys
|
|
|
|
|= sed=(unit [=ship =udiff:point:able:jael])
|
|
|
|
=< abet
|
|
|
|
?~ sed
|
2020-06-16 10:29:17 +03:00
|
|
|
this
|
2019-11-14 21:39:50 +03:00
|
|
|
(emit %pass / %arvo %j %moon u.sed)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2020-07-29 19:14:18 +03:00
|
|
|
++ poke-code
|
|
|
|
|= act=?(~ %reset)
|
|
|
|
=< abet
|
|
|
|
?~ act
|
|
|
|
this
|
|
|
|
(emit %pass / %arvo %j %step ~)
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ poke-mass
|
2018-03-19 07:18:20 +03:00
|
|
|
|= ~ =< abet
|
2019-12-02 13:08:37 +03:00
|
|
|
(emit %pass /heft %arvo %d %flog %heft ~)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-01-30 02:06:28 +03:00
|
|
|
++ poke-automass
|
|
|
|
|= recur=@dr
|
2020-06-17 10:54:27 +03:00
|
|
|
=. mass-timer.sat
|
|
|
|
[/helm/automass (add now.bowl recur) recur]
|
|
|
|
abet:(emit %pass way.mass-timer.sat %arvo %b %wait nex.mass-timer.sat)
|
2019-01-30 03:25:47 +03:00
|
|
|
::
|
|
|
|
++ poke-cancel-automass
|
|
|
|
|= ~
|
2020-06-17 10:54:27 +03:00
|
|
|
abet:(emit %pass way.mass-timer.sat %arvo %b %rest nex.mass-timer.sat)
|
2019-01-30 02:06:28 +03:00
|
|
|
::
|
2019-11-23 04:24:42 +03:00
|
|
|
++ poke-pack
|
|
|
|
|= ~ =< abet
|
2019-12-02 13:08:37 +03:00
|
|
|
(emit %pass /pack %arvo %d %flog %pack ~)
|
2019-02-16 12:34:38 +03:00
|
|
|
::
|
2019-01-30 02:06:28 +03:00
|
|
|
++ take-wake-automass
|
2019-04-13 01:48:22 +03:00
|
|
|
|= [way=wire error=(unit tang)]
|
|
|
|
?^ error
|
|
|
|
%- (slog u.error)
|
|
|
|
~& %helm-wake-automass-fail
|
|
|
|
abet
|
2020-06-17 10:54:27 +03:00
|
|
|
=. nex.mass-timer.sat (add now.bowl tim.mass-timer.sat)
|
2019-01-30 02:06:28 +03:00
|
|
|
=< abet
|
|
|
|
%- emil
|
2019-11-14 21:39:50 +03:00
|
|
|
:~ [%pass /heft %arvo %d %flog %crud %hax-heft ~]
|
2020-06-17 10:54:27 +03:00
|
|
|
[%pass way.mass-timer.sat %arvo %b %wait nex.mass-timer.sat]
|
2019-01-30 02:06:28 +03:00
|
|
|
==
|
|
|
|
::
|
2017-10-06 15:46:46 +03:00
|
|
|
++ poke-send-hi
|
2015-12-20 23:50:45 +03:00
|
|
|
|= {her/ship mes/(unit tape)} =< abet
|
2019-11-14 21:39:50 +03:00
|
|
|
%- emit
|
|
|
|
:* %pass /helm/hi/(scot %p her)
|
|
|
|
%agent [her %hood] %poke
|
|
|
|
%helm-hi !>(?~(mes '' (crip u.mes)))
|
|
|
|
==
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2015-11-26 01:39:24 +03:00
|
|
|
::
|
2017-10-10 12:05:09 +03:00
|
|
|
++ poke-hi
|
|
|
|
|= mes/@t
|
2017-10-10 06:39:08 +03:00
|
|
|
~| %poke-hi-fail
|
|
|
|
?: =(%fail mes)
|
|
|
|
~& %poke-hi-fail
|
|
|
|
!!
|
2020-06-17 10:54:27 +03:00
|
|
|
abet:(flog %text "< {<src.bowl>}: {(trip mes)}")
|
2017-10-10 06:39:08 +03:00
|
|
|
::
|
2017-10-06 15:46:46 +03:00
|
|
|
++ poke-atom
|
2017-06-07 03:29:37 +03:00
|
|
|
|= ato/@
|
|
|
|
=+ len=(scow %ud (met 3 ato))
|
|
|
|
=+ gum=(scow %p (mug ato))
|
|
|
|
=< abet
|
2020-06-17 10:54:27 +03:00
|
|
|
(flog %text "< {<src.bowl>}: atom: {len} bytes, mug {gum}")
|
2017-06-07 03:29:37 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ coup-hi
|
2015-12-20 23:50:45 +03:00
|
|
|
|= {pax/path cop/(unit tang)} =< abet
|
2018-03-19 07:18:20 +03:00
|
|
|
?> ?=({@t ~} pax)
|
2019-11-14 21:39:50 +03:00
|
|
|
(flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful")
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2015-12-20 23:50:45 +03:00
|
|
|
++ poke-reload |=(all/(list term) (poke-reload-desk %home all))
|
2015-09-02 01:20:17 +03:00
|
|
|
++ poke-reload-desk :: reload vanes
|
2018-01-04 05:31:22 +03:00
|
|
|
|: $:{syd/desk all/(list term)} =< abet
|
2015-09-02 01:20:17 +03:00
|
|
|
%- emil
|
|
|
|
%+ turn all
|
2020-06-17 10:54:27 +03:00
|
|
|
=+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl)
|
2018-03-19 07:18:20 +03:00
|
|
|
=/ van/(list {term ~})
|
2016-12-03 00:41:06 +03:00
|
|
|
:- zus=[%zuse ~]
|
2017-02-13 23:43:18 +03:00
|
|
|
~(tap by dir:.^(arch %cy (welp top /sys/vane)))
|
2015-12-20 23:50:45 +03:00
|
|
|
|= nam/@tas
|
2016-12-03 00:41:06 +03:00
|
|
|
=. nam
|
|
|
|
?. =(1 (met 3 nam))
|
|
|
|
nam
|
2019-12-18 03:48:08 +03:00
|
|
|
=/ zaz/(list {p/knot ~})
|
2018-03-19 07:18:20 +03:00
|
|
|
(skim van |=({a/term ~} =(nam (end 3 1 a))))
|
|
|
|
?> ?=({{@ ~} ~} zaz)
|
2016-12-03 00:41:06 +03:00
|
|
|
`term`p.i.zaz
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ tip=(end 3 1 nam)
|
2017-10-06 15:46:46 +03:00
|
|
|
=+ zus==('z' tip)
|
2016-12-02 04:17:02 +03:00
|
|
|
=+ way=?:(zus (welp top /sys/[nam]) (welp top /sys/vane/[nam]))
|
2016-01-26 03:47:58 +03:00
|
|
|
=+ fil=.^(@ %cx (welp way /hoon))
|
2019-11-14 21:39:50 +03:00
|
|
|
[%pass /reload %arvo %d %flog %veer ?:(=('z' tip) %$ tip) way fil]
|
2019-02-01 22:02:33 +03:00
|
|
|
:: +poke-reset: send %lyra to initiate kernel upgrade
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-02-01 22:02:33 +03:00
|
|
|
:: And reinstall %zuse and the vanes with %veer.
|
2018-12-07 01:30:57 +03:00
|
|
|
:: Trigger with |reset.
|
2017-10-19 06:50:48 +03:00
|
|
|
::
|
2018-12-07 01:30:57 +03:00
|
|
|
++ poke-reset
|
2020-06-16 10:29:17 +03:00
|
|
|
|= hood-reset=~
|
2018-12-07 01:30:57 +03:00
|
|
|
=< abet
|
2019-12-01 08:54:54 +03:00
|
|
|
%- emil
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (list card:agent:gall)
|
2020-06-17 10:54:27 +03:00
|
|
|
=/ top=path /(scot %p our.bowl)/home/(scot %da now.bowl)/sys
|
2020-05-09 15:09:26 +03:00
|
|
|
=/ hun .^(@t %cx (welp top /hoon/hoon))
|
|
|
|
=/ arv .^(@t %cx (welp top /arvo/hoon))
|
|
|
|
~! *task:able:dill
|
|
|
|
:- [%pass /reset %arvo %d %flog %lyra `hun arv]
|
2015-09-02 01:20:17 +03:00
|
|
|
%+ turn
|
2018-12-07 01:30:57 +03:00
|
|
|
(module-ova:pill top)
|
2019-11-14 21:39:50 +03:00
|
|
|
|=([=wire =flog:dill] [%pass wire %arvo %d %flog flog])
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2020-09-10 08:49:37 +03:00
|
|
|
++ poke-trim
|
|
|
|
|= pri=@ud =< abet
|
|
|
|
(emit %pass /pack %arvo %d %flog %crop pri)
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ poke-verb :: toggle verbose
|
2018-03-19 07:18:20 +03:00
|
|
|
|= ~ =< abet
|
2019-11-14 21:39:50 +03:00
|
|
|
(flog %verb ~)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-12-11 21:55:46 +03:00
|
|
|
++ poke-ames-sift
|
|
|
|
|= ships=(list ship) =< abet
|
|
|
|
(emit %pass /helm %arvo %a %sift ships)
|
|
|
|
::
|
2019-12-03 02:54:01 +03:00
|
|
|
++ poke-ames-verb
|
|
|
|
|= veb=(list verb:ames) =< abet
|
|
|
|
(emit %pass /helm %arvo %a %spew veb)
|
|
|
|
::
|
2020-05-28 20:24:29 +03:00
|
|
|
++ poke-ames-wake
|
|
|
|
|= ~ =< abet
|
|
|
|
(emit %pass /helm %arvo %a %stir '')
|
|
|
|
::
|
2019-09-27 20:56:27 +03:00
|
|
|
++ poke-knob
|
|
|
|
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
|
2019-11-14 21:39:50 +03:00
|
|
|
(emit %pass /helm %arvo %d %knob error-tag level)
|
2017-12-12 23:23:00 +03:00
|
|
|
::
|
2018-10-11 01:26:51 +03:00
|
|
|
++ poke-serve
|
2019-07-04 09:09:44 +03:00
|
|
|
|= [=binding:eyre =generator:eyre] =< abet
|
2019-11-14 21:39:50 +03:00
|
|
|
(emit %pass /helm/serv %arvo %e %serve binding generator)
|
|
|
|
::
|
|
|
|
++ poke
|
|
|
|
|= [=mark =vase]
|
|
|
|
?+ mark ~|([%poke-helm-bad-mark mark] !!)
|
2020-06-16 10:29:17 +03:00
|
|
|
%helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift)
|
|
|
|
%helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb)
|
|
|
|
%helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake)
|
|
|
|
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
|
|
|
|
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
|
|
|
|
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)
|
2020-07-29 19:14:18 +03:00
|
|
|
%helm-code =;(f (f !<(_+<.f vase)) poke-code)
|
2019-11-14 21:39:50 +03:00
|
|
|
%helm-hi =;(f (f !<(_+<.f vase)) poke-hi)
|
2020-06-16 10:29:17 +03:00
|
|
|
%helm-knob =;(f (f !<(_+<.f vase)) poke-knob)
|
2019-11-14 21:39:50 +03:00
|
|
|
%helm-mass =;(f (f !<(_+<.f vase)) poke-mass)
|
2020-06-16 10:29:17 +03:00
|
|
|
%helm-moon =;(f (f !<(_+<.f vase)) poke-moon)
|
2019-12-02 13:08:37 +03:00
|
|
|
%helm-pack =;(f (f !<(_+<.f vase)) poke-pack)
|
2020-06-16 10:29:17 +03:00
|
|
|
%helm-rekey =;(f (f !<(_+<.f vase)) poke-rekey)
|
2019-11-14 21:39:50 +03:00
|
|
|
%helm-reload =;(f (f !<(_+<.f vase)) poke-reload)
|
|
|
|
%helm-reload-desk =;(f (f !<(_+<.f vase)) poke-reload-desk)
|
|
|
|
%helm-reset =;(f (f !<(_+<.f vase)) poke-reset)
|
|
|
|
%helm-send-hi =;(f (f !<(_+<.f vase)) poke-send-hi)
|
|
|
|
%helm-serve =;(f (f !<(_+<.f vase)) poke-serve)
|
2020-09-10 08:49:37 +03:00
|
|
|
%helm-trim =;(f (f !<(_+<.f vase)) poke-trim)
|
2020-06-16 10:29:17 +03:00
|
|
|
%helm-verb =;(f (f !<(_+<.f vase)) poke-verb)
|
2020-06-17 09:36:09 +03:00
|
|
|
%helm-write-sec-atom =;(f (f !<(_+<.f vase)) poke-sec-atom)
|
2019-11-14 21:39:50 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ take-agent
|
2019-11-19 07:36:21 +03:00
|
|
|
|= [=wire =sign:agent:gall]
|
2019-11-14 21:39:50 +03:00
|
|
|
?+ wire ~|([%helm-bad-take-agent wire -.sign] !!)
|
|
|
|
[%helm %hi *] ?> ?=(%poke-ack -.sign)
|
|
|
|
(coup-hi t.t.wire p.sign)
|
|
|
|
==
|
2018-10-11 01:26:51 +03:00
|
|
|
::
|
|
|
|
++ take-bound
|
2019-07-04 09:09:44 +03:00
|
|
|
|= [wir=wire success=? binding=binding:eyre] =< abet
|
2019-11-14 21:39:50 +03:00
|
|
|
(flog %text "bound: {<success>}")
|
|
|
|
::
|
2020-06-16 10:29:17 +03:00
|
|
|
++ take-arvo
|
2019-11-14 21:39:50 +03:00
|
|
|
|= [=wire =sign-arvo]
|
|
|
|
?+ wire ~|([%helm-bad-take-wire wire +<.sign-arvo] !!)
|
|
|
|
[%automass *] %+ take-wake-automass t.wire
|
|
|
|
?>(?=(%wake +<.sign-arvo) +>.sign-arvo)
|
|
|
|
[%serv *] %+ take-bound t.wire
|
|
|
|
?>(?=(%bound +<.sign-arvo) +>.sign-arvo)
|
|
|
|
==
|
2015-05-11 20:53:47 +03:00
|
|
|
--
|