2015-05-11 20:53:47 +03:00
|
|
|
:: :: ::
|
2017-11-29 23:40:44 +03:00
|
|
|
:::: /hoon/helm/hood/lib :: ::
|
2015-05-11 20:53:47 +03:00
|
|
|
:: :: ::
|
|
|
|
/? 310 :: version
|
2017-12-12 23:23:00 +03:00
|
|
|
/- sole, hall
|
2018-12-07 01:30:57 +03:00
|
|
|
/+ pill
|
2015-05-11 20:53:47 +03:00
|
|
|
:: :: ::
|
|
|
|
:::: :: ::
|
|
|
|
:: :: ::
|
|
|
|
|% :: ::
|
2017-11-30 00:29:35 +03:00
|
|
|
++ part {$helm $0 pith} :: helm state
|
|
|
|
++ pith :: helm content
|
2018-09-13 08:48:18 +03:00
|
|
|
$: hoc/(map bone session) :: consoles
|
2017-10-06 15:46:46 +03:00
|
|
|
== ::
|
2017-11-30 00:29:35 +03:00
|
|
|
++ session ::
|
2018-12-07 01:30:57 +03:00
|
|
|
$: say/sole-share:sole :: console state
|
|
|
|
mud/(unit (sole-dialog:sole @ud)) :: console dialog
|
2019-01-30 03:25:47 +03:00
|
|
|
mass-timer/{way/wire nex/@da tim/@dr}
|
2017-10-06 15:46:46 +03:00
|
|
|
== ::
|
2015-05-11 20:53:47 +03:00
|
|
|
:: :: ::
|
|
|
|
:::: :: ::
|
|
|
|
:: :: ::
|
2017-05-16 23:56:54 +03:00
|
|
|
++ hood-nuke :: block/unblock
|
|
|
|
$: him/ship ::
|
|
|
|
== ::
|
2015-05-12 03:31:37 +03:00
|
|
|
++ hood-reset :: reset command
|
2015-12-09 04:54:26 +03:00
|
|
|
$~ ::
|
2015-05-11 20:53:47 +03:00
|
|
|
++ helm-verb :: reset command
|
2015-12-09 04:54:26 +03:00
|
|
|
$~ ::
|
2015-05-12 03:31:37 +03:00
|
|
|
++ hood-reload :: reload command
|
2015-05-11 20:53:47 +03:00
|
|
|
(list term) ::
|
|
|
|
-- ::
|
|
|
|
:: :: ::
|
|
|
|
:::: :: ::
|
2016-11-17 04:42:58 +03:00
|
|
|
:: :: ::
|
2018-01-04 05:31:22 +03:00
|
|
|
|: $:{bowl:gall part} :: main helm work
|
|
|
|
=+ sez=(fall (~(get by hoc) ost) $:session)
|
2016-11-08 04:40:00 +03:00
|
|
|
=> |% :: arvo structures
|
|
|
|
++ card ::
|
2019-02-16 12:34:38 +03:00
|
|
|
$% [%bonk wire ~] ::
|
|
|
|
{$conf wire dock $load ship term} ::
|
2017-10-03 07:36:34 +03:00
|
|
|
{$flog wire flog:dill} ::
|
2019-05-03 00:27:04 +03:00
|
|
|
[%mint wire p=ship q=safe:rights:jael]
|
2017-10-03 07:36:34 +03:00
|
|
|
{$nuke wire ship} ::
|
2019-02-09 02:03:46 +03:00
|
|
|
[%serve wire binding:http-server generator:http-server]
|
2016-11-08 04:40:00 +03:00
|
|
|
{$poke wire dock pear} ::
|
2019-01-30 03:25:47 +03:00
|
|
|
{$rest wire @da} ::
|
2019-01-30 02:06:28 +03:00
|
|
|
{$wait wire @da} ::
|
2016-11-08 04:40:00 +03:00
|
|
|
== ::
|
|
|
|
++ move (pair bone card) :: user-level move
|
|
|
|
++ pear :: poke fruit
|
|
|
|
$% {$hood-unsync desk ship desk} ::
|
|
|
|
{$ask-mail cord} ::
|
|
|
|
{$helm-hi cord} ::
|
2017-12-12 23:23:00 +03:00
|
|
|
{$drum-start well:gall} ::
|
|
|
|
{$hall-action action:hall} ::
|
2016-11-08 04:40:00 +03:00
|
|
|
== ::
|
2015-09-02 01:20:17 +03:00
|
|
|
--
|
2018-01-04 05:31:22 +03:00
|
|
|
=+ moz=((list move))
|
|
|
|
|%
|
2015-09-02 01:20:17 +03:00
|
|
|
++ abet :: resolve
|
2017-11-30 00:29:35 +03:00
|
|
|
[(flop moz) %_(+<+.$ hoc (~(put by hoc) ost sez))]
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
|
|
|
++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card
|
|
|
|
++ emil :: return cards
|
2017-10-06 15:46:46 +03:00
|
|
|
|= (list card)
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
|
|
|
?~(+< +> $(+< t.+<, +> (emit i.+<)))
|
|
|
|
::
|
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
|
|
|
|
+>.$
|
|
|
|
?. =(our who.u.sed)
|
|
|
|
~& [%wrong-private-key-ship who.u.sed]
|
|
|
|
+>.$
|
|
|
|
=/ lyf=life .^(@ud j+/(scot %p our)/life/(scot %da now)/(scot %p our))
|
|
|
|
?. =(+(lyf) lyf.u.sed)
|
|
|
|
~& [%wrong-private-key-life expected=+(lyf) actual=lyf.u.sed]
|
|
|
|
+>.$
|
|
|
|
:: our new private key, as a +tree of +rite
|
|
|
|
::
|
|
|
|
=/ rit (sy [%jewel (my [lyf.u.sed key.u.sed] ~)] ~)
|
2019-05-03 00:27:04 +03:00
|
|
|
(emit %mint / our rit)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2017-05-16 23:56:54 +03:00
|
|
|
++ poke-nuke :: initialize
|
|
|
|
|= him/ship =< abet
|
|
|
|
(emit %nuke /helm him)
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ poke-mass
|
2018-03-19 07:18:20 +03:00
|
|
|
|= ~ =< abet
|
2015-09-02 01:20:17 +03:00
|
|
|
(emit %flog /heft %crud %hax-heft ~)
|
|
|
|
::
|
2019-01-30 02:06:28 +03:00
|
|
|
++ poke-automass
|
|
|
|
|= recur=@dr
|
2019-01-30 03:25:47 +03:00
|
|
|
=. mass-timer.sez
|
|
|
|
[/helm/automass (add now recur) recur]
|
|
|
|
abet:(emit %wait way.mass-timer.sez nex.mass-timer.sez)
|
|
|
|
::
|
|
|
|
++ poke-cancel-automass
|
|
|
|
|= ~
|
|
|
|
abet:(emit %rest way.mass-timer.sez nex.mass-timer.sez)
|
2019-01-30 02:06:28 +03:00
|
|
|
::
|
2019-02-16 12:34:38 +03:00
|
|
|
++ poke-bonk
|
|
|
|
|= ~
|
|
|
|
~& .^((unit @da) %a /(scot %p our)/time/(scot %da now)/(scot %p our))
|
|
|
|
%- %- slog :_ ~ .^(tank %b /(scot %p our)/timers/(scot %da now))
|
|
|
|
abet:(emit %bonk /bonk ~)
|
|
|
|
::
|
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
|
2019-01-30 03:25:47 +03:00
|
|
|
=. nex.mass-timer.sez (add now tim.mass-timer.sez)
|
2019-01-30 02:06:28 +03:00
|
|
|
=< abet
|
|
|
|
%- emil
|
|
|
|
:~ [%flog /heft %crud %hax-heft ~]
|
2019-01-30 03:25:47 +03:00
|
|
|
[%wait way.mass-timer.sez nex.mass-timer.sez]
|
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
|
2015-09-02 01:20:17 +03:00
|
|
|
%^ emit %poke /helm/hi/(scot %p her)
|
|
|
|
[[her %hood] %helm-hi ?~(mes '' (crip u.mes))]
|
|
|
|
::
|
2015-11-26 01:39:24 +03:00
|
|
|
++ poke-send-ask
|
2019-01-15 20:22:42 +03:00
|
|
|
|= mel/cord
|
|
|
|
abet
|
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
|
|
|
|
!!
|
2017-10-10 12:05:09 +03:00
|
|
|
abet:(emit %flog /di %text "< {<src>}: {(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
|
|
|
|
(emit %flog /di %text "< {<src>}: atom: {len} bytes, mug {gum}")
|
|
|
|
::
|
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)
|
2016-06-13 18:38:02 +03:00
|
|
|
(emit %flog ~ %text "hi {(trip i.pax)} {?~(cop "" "un")}successful")
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2016-08-20 00:07:34 +03:00
|
|
|
++ coup-ask
|
|
|
|
|= {pax/path cop/(unit tang)} =< abet
|
2018-03-19 07:18:20 +03:00
|
|
|
?> ?=({@t ~} pax)
|
2016-08-20 03:38:59 +03:00
|
|
|
(emit %flog ~ %text "ask {<src>} {?~(cop "" "un")}successful")
|
2016-08-20 00:07:34 +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
|
|
|
|
%- flop
|
|
|
|
%+ turn all
|
2016-12-02 04:17:02 +03:00
|
|
|
=+ top=`path`/(scot %p our)/[syd]/(scot %da now)
|
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
|
2018-03-19 07:18:20 +03:00
|
|
|
=+ ^- zaz/(list {p/knot ~})
|
|
|
|
(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))
|
2015-09-02 01:20:17 +03:00
|
|
|
[%flog /reload [%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
|
|
|
|
|= hood-reset
|
|
|
|
=< abet
|
|
|
|
%- emil %- flop
|
|
|
|
^- (list card)
|
|
|
|
=/ top=path /(scot %p our)/home/(scot %da now)/sys
|
|
|
|
=/ hun .^(@ %cx (welp top /hoon/hoon))
|
|
|
|
=/ arv .^(@ %cx (welp top /arvo/hoon))
|
2019-02-01 22:02:33 +03:00
|
|
|
:- [%flog /reset [%lyra `@t`hun `@t`arv]]
|
2015-09-02 01:20:17 +03:00
|
|
|
%+ turn
|
2018-12-07 01:30:57 +03:00
|
|
|
(module-ova:pill top)
|
|
|
|
|=(a=[wire flog:dill] [%flog a])
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
|
|
|
++ poke-verb :: toggle verbose
|
2018-03-19 07:18:20 +03:00
|
|
|
|= ~ =< abet
|
2015-09-02 01:20:17 +03:00
|
|
|
(emit %flog /helm %verb ~)
|
|
|
|
::
|
|
|
|
++ take-onto :: result of %conf
|
2016-12-07 06:13:33 +03:00
|
|
|
|= saw/(each suss:gall tang) =< abet
|
2015-09-02 01:20:17 +03:00
|
|
|
%- emit
|
|
|
|
?- -.saw
|
2018-03-19 06:54:47 +03:00
|
|
|
%| [%flog ~ %crud %onto `tang`p.saw]
|
|
|
|
%& [%flog ~ %text "<{<p.saw>}>"]
|
2015-09-02 01:20:17 +03:00
|
|
|
==
|
|
|
|
::
|
2017-05-22 04:36:29 +03:00
|
|
|
++ take-woot :: result of %want
|
2015-12-20 23:50:45 +03:00
|
|
|
|= {way/wire her/ship cop/coop} =< abet
|
2015-09-02 01:20:17 +03:00
|
|
|
(emit %flog ~ %text "woot: {<[way cop]>}")
|
2017-12-12 23:23:00 +03:00
|
|
|
::
|
2018-10-11 01:26:51 +03:00
|
|
|
++ poke-serve
|
2019-02-09 02:03:46 +03:00
|
|
|
|= [=binding:http-server =generator:http-server] =< abet
|
2018-10-11 01:26:51 +03:00
|
|
|
(emit %serve /helm/serv binding generator)
|
|
|
|
::
|
|
|
|
++ take-bound
|
2019-02-09 02:03:46 +03:00
|
|
|
|= [wir=wire success=? binding=binding:http-server] =< abet
|
2018-10-11 01:26:51 +03:00
|
|
|
(emit %flog ~ %text "bound: {<success>}")
|
|
|
|
::
|
2018-01-05 22:19:34 +03:00
|
|
|
++ poke-tlon-init-stream
|
|
|
|
:: creates stream channel and makes it pull from
|
|
|
|
:: urbit-meta on {met}.
|
2017-12-12 23:23:00 +03:00
|
|
|
|= met/ship =< abet
|
|
|
|
%- emil
|
|
|
|
%- flop
|
|
|
|
:~ ^- card
|
|
|
|
:^ %poke /helm/web/stream/create [our %hall]
|
|
|
|
:- %hall-action
|
|
|
|
:- %create
|
|
|
|
[%stream 'stream relay channel' %channel]
|
|
|
|
::
|
|
|
|
:^ %poke /helm/web/stream/filter [our %hall]
|
|
|
|
:- %hall-action
|
|
|
|
:- %filter
|
|
|
|
[%stream | |]
|
|
|
|
::
|
|
|
|
:^ %poke /helm/web/stream/source [our %hall]
|
|
|
|
:- %hall-action
|
|
|
|
:- %source
|
|
|
|
[%stream & [[[met %urbit-meta] `[da+(sub now ~d1) ~]] ~ ~]]
|
|
|
|
==
|
|
|
|
::
|
2018-01-05 22:19:34 +03:00
|
|
|
++ poke-tlon-add-fora
|
|
|
|
:: makes the local urbit-meta pull from {for}'s fora
|
|
|
|
:: notification channels.
|
|
|
|
|= for/ship =< abet
|
|
|
|
%- emil
|
|
|
|
:~ :^ %poke /helm/web/fora/source [our %hall]
|
|
|
|
:- %hall-action
|
|
|
|
:- %source
|
|
|
|
[%urbit-meta & [[[for %fora-posts] `[da+now ~]] ~ ~]]
|
|
|
|
::
|
|
|
|
:^ %poke /helm/web/fora/source [our %hall]
|
|
|
|
:- %hall-action
|
|
|
|
:- %source
|
|
|
|
[%urbit-meta & [[[for %fora-comments] `[da+now ~]] ~ ~]]
|
|
|
|
==
|
|
|
|
::
|
2017-12-12 23:23:00 +03:00
|
|
|
++ poke-tlon-add-stream
|
2018-01-05 22:19:34 +03:00
|
|
|
:: makes the local urbit-meta pull from {web}'s stream.
|
2017-12-12 23:23:00 +03:00
|
|
|
|= web/ship =< abet
|
|
|
|
%- emit
|
|
|
|
:^ %poke /helm/web/stream/source [our %hall]
|
|
|
|
:+ %hall-action %source
|
|
|
|
[%urbit-meta & [[[web %stream] `[da+now ~]] ~ ~]]
|
2015-05-11 20:53:47 +03:00
|
|
|
--
|