mirror of
https://github.com/urbit/shrub.git
synced 2025-01-06 04:07:23 +03:00
should have been cleaned by factor
This commit is contained in:
parent
c0a2ca3c1c
commit
fcd0df304e
146
arvo/jael.hoon
146
arvo/jael.hoon
@ -1,146 +0,0 @@
|
||||
:: %jael, secret storage
|
||||
::
|
||||
:::: /hoon/jael/arvo
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
:: %jael is logically homogeneous, but please follow these conventions:
|
||||
::
|
||||
:: /cap :: foreign app keys
|
||||
:: /service :: service name, eg %face for FB
|
||||
:: /appid :: your ship's app-id
|
||||
:: /@uvH :: by hash
|
||||
:: /@ud :: by number
|
||||
:: /@tas :: by name
|
||||
::
|
||||
:: /key :: foreign user secrets
|
||||
:: /service :: service name, eg %face
|
||||
:: /userid :: user identity
|
||||
::
|
||||
:: /urb :: urbit secrets
|
||||
:: /tok/hash
|
||||
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %jael state
|
||||
$: %0 :: %jael version
|
||||
ent=@ :: entropy
|
||||
sef=safe :: secret tree
|
||||
red=(map duct (set path)) :: reverse subscribers
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
$% [%dead p=path] :: key expired
|
||||
[%live p=path q=@] :: key created
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
$% [%kill p=path] :: discard secret
|
||||
[%make p=@uw q=(unit ,@da) r=@ud s=path] :: generate random
|
||||
[%nuke ~] :: erase subscriber
|
||||
[%tell p=@uw q=(unit ,@da) r=path] :: save secret
|
||||
== ::
|
||||
++ move ,[p=duct q=(wind note gift)] :: typed move
|
||||
++ note :: out request $->
|
||||
$% $: %b :: to %behn
|
||||
$% [%wait p=@da] ::
|
||||
[%rest p=@da] ::
|
||||
== == == ::
|
||||
++ perm (pair ,@ud (list ,@ud)) :: prime definition
|
||||
++ safe ::
|
||||
$: nub=(unit ,@uw) :: secret
|
||||
dex=(unit ,@da) :: expiration
|
||||
sud=(set duct) :: subscribers
|
||||
kin=(map term safe) :: children
|
||||
== ::
|
||||
-- ::
|
||||
:: programs
|
||||
|%
|
||||
++ bu
|
||||
|_ $: xap=path
|
||||
fes=(list safe)
|
||||
moz=(list move)
|
||||
==
|
||||
axle
|
||||
::
|
||||
++ bu-abet :: resolve
|
||||
^- axle
|
||||
?~ xap +<+
|
||||
%= bu-abet
|
||||
xap t.xap
|
||||
fes t.fes
|
||||
sef %= i.fes
|
||||
kin
|
||||
?: =(*safe sef)
|
||||
(~(del by kin.i.fes) i.xap)
|
||||
(~(put by kin.i.fes) i.xap sef)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ bu-kill :: destroy
|
||||
^+ .
|
||||
=+ dus=(~(tap by
|
||||
|
||||
::
|
||||
++ bu-ajar :: descend
|
||||
|= pax=path
|
||||
^+ +>
|
||||
?~ pax +>.$
|
||||
%= $
|
||||
pax t.pax
|
||||
xap [i.pax xap]
|
||||
fes [sef fes]
|
||||
sef (fall (~(get by kin.sef) i.pax) *safe)
|
||||
==
|
||||
--
|
||||
++ bury
|
||||
|= [pax=path lex=axle]
|
||||
(~(bu-ajar bu [~ ~ ~] tof.lex lex) pax)
|
||||
--
|
||||
. ==
|
||||
=| axle
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
=^ moz +>+>-
|
||||
=< bu-abet
|
||||
?- -.p.q.hic
|
||||
%kill
|
||||
kill:(bury p.p.q.hic +>+>-)
|
||||
::
|
||||
%make
|
||||
%nuke
|
||||
%tell
|
||||
==
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %jael-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
:: actually scry
|
||||
~
|
||||
::
|
||||
++ stay :: save w+o cache
|
||||
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~])))
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
103
arvo/kahn.hoon
103
arvo/kahn.hoon
@ -1,103 +0,0 @@
|
||||
:: %kahn, social state
|
||||
::
|
||||
:::: /hoon/kahn/arvo
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %kahn state
|
||||
$: %0 ::
|
||||
soc=(map monk node) :: social graph
|
||||
red=(map duct (set monk)) :: reverse subscribers
|
||||
== ::
|
||||
++ cert (each will ,*) :: urbit or other
|
||||
++ gift :: out result <-$
|
||||
$: [%then p=node] :: propagate change
|
||||
== ::
|
||||
++ node :: social identity
|
||||
$: tin=(map monk link) :: inbound links
|
||||
oud=(map monk link) :: outbound links
|
||||
cet=cert :: certificate
|
||||
sud=(set duct) :: subscribers
|
||||
== ::
|
||||
++ khan ,[p=@tas q=@ta] :: foreign identity
|
||||
++ kiss :: social update
|
||||
$: [%cert p=monk q=cert] :: set certificate
|
||||
[%hear p=monk] :: watch identity
|
||||
[%know p=monk q=(map monk link)] :: set forward links
|
||||
[%nuke ~] :: erase subscriber
|
||||
== ::
|
||||
++ link (pair rank ,@da) :: trust+expiration
|
||||
++ monk (each ship khan) :: general identity
|
||||
++ rank :: privilege ring
|
||||
$? %0 :: complete trust
|
||||
%1 :: structural trust
|
||||
%2 :: social trust
|
||||
%3 :: neutral trust
|
||||
%4 :: negative trust
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %khan-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
?. =(big [~ who]) ~
|
||||
=+ ^= yub ^- [(unit monk)
|
||||
?: =(%urb syd)
|
||||
?. ?=([* ~] tyl) ~
|
||||
=+ goy=(slaw %p
|
||||
|
||||
?+ ?=([%$ %da @]
|
||||
?+ lot ~
|
||||
[%$ %ud @]
|
||||
%+ bind
|
||||
(perm who u.hun q.p.lot [syd t.tyl])
|
||||
|=(a=* [%noun a])
|
||||
::
|
||||
?. =(now q.p.lot) ~
|
||||
%+ bind
|
||||
(temp who u.hun [syd t.tyl])
|
||||
|=(a=* [%noun a])
|
||||
==
|
||||
?. ?=([%da
|
||||
=+ mok ^- (unit monk)
|
||||
?: =(%urb face)
|
||||
(
|
||||
|
||||
::
|
||||
++ stay :: save w+o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
104
arvo/lunt.hoon
104
arvo/lunt.hoon
@ -1,104 +0,0 @@
|
||||
:: %lunt, fleet job control
|
||||
::
|
||||
:::: /hoon/lunt/arvo
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %lunt state
|
||||
$: %0 ::
|
||||
all=(map ship axil) :: state by owner
|
||||
== ::
|
||||
++ born ,[p=brat q=(unit ship)] :: task identity
|
||||
++ brat ,@ud :: task number
|
||||
++ bulb ::
|
||||
$: p=@p :: ship identity
|
||||
q=home :: server data
|
||||
== ::
|
||||
++ home :: storage access
|
||||
$: pad=@uvH :: passcode
|
||||
huc=husk :: log server
|
||||
sog=hulk :: storage server
|
||||
== ::
|
||||
++ hulk :: checkpoint service
|
||||
$% [%astr p=@ud q=@ud] :: S3
|
||||
== ::
|
||||
++ husk :: log server
|
||||
$: pro=@tas :: protocol
|
||||
cap=@uvH :: access code
|
||||
srv=(list (pair ,@ud clip)) :: server cluster
|
||||
== ::
|
||||
++ gift :: result
|
||||
$: [%die p=brat] :: kill
|
||||
[%int p=brat] :: interrupt
|
||||
[%run p=brat q=@p r=home] :: load
|
||||
[%say p=brat q=(list ovum)] :: send events
|
||||
[%new p=brat q=@p r=home s=(list ovum)] :: create
|
||||
== ::
|
||||
++ kiss :: request
|
||||
$: [%com p=@p] :: toggle compute svr
|
||||
[%end p=brat] :: local end
|
||||
[%fan p=@ud] :: set local fanout
|
||||
[%kil ~] :: terminate ship
|
||||
[%int ~] :: interrupt ship
|
||||
[%new p=@p q=(set ,@p) q=home r=@uvI] :: create ship
|
||||
[%run p=@p q=home] :: run existing ship
|
||||
[%say p=(list ovum)] :: remote events
|
||||
[%sto p=husk] :: toggle logger
|
||||
== ::
|
||||
++ axil ::
|
||||
$: bus=(unit ,@p) :: master
|
||||
loc=@ud :: local resources
|
||||
hen=(unit duct) :: effect duct
|
||||
ent=@ :: entropy
|
||||
seq=@ :: brat sequence
|
||||
why=(map duct born) :: hosted ships
|
||||
how=(map born duct) :: reverse why
|
||||
hut=(map born home) :: storage control
|
||||
ham=(set hulk) :: block stores
|
||||
sto=(set husk) :: log stores
|
||||
com=(set ship) :: compute resources
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~
|
||||
::
|
||||
++ stay :: save w+o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
@ -1,94 +0,0 @@
|
||||
:: %musk, realm management
|
||||
::
|
||||
:::: /hoon/musk/arvo
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ axle :: %musk state
|
||||
$: %0 ::
|
||||
all=(map ship axil) :: state by owner
|
||||
== ::
|
||||
++ axil ::
|
||||
$: kid=(map ship girl) :: daughters
|
||||
deq=(map narc ship) :: reverse address
|
||||
siq=(map ship (list clan)) :: ship to clans
|
||||
kes=(map clan (list ship)) :: clan to ships
|
||||
== ::
|
||||
++ clan ,@tas :: group identity
|
||||
++ narc :: contact address
|
||||
$: [%$ p=ship] :: urbit
|
||||
[%m p=@t q=@t] :: email p@q
|
||||
[%f p=@t] :: facebook
|
||||
[%g p=@t] :: google
|
||||
[%p p=@t] :: phone message
|
||||
[%t p=@t] :: twitter
|
||||
== ::
|
||||
++ pony :: daughter status
|
||||
$% [%cold ~] :: virginal
|
||||
[%dead ~] :: written off
|
||||
[%fake ~] :: virtual
|
||||
[%free ~] :: downloaded
|
||||
[%here ~] :: hosted
|
||||
[%left p=(unit ship)] :: run away to
|
||||
== ::
|
||||
++ rank :: relative privilege
|
||||
$? %0 :: enemy
|
||||
%1 :: neighbor
|
||||
%2 :: guest+customer
|
||||
%3 :: friend+employee
|
||||
%4 :: officer+family
|
||||
%5 :: self+admin
|
||||
== ::
|
||||
++ girl ::
|
||||
$: hop=pony :: status
|
||||
tag=(unit ,@tas) :: petname
|
||||
tip=rank :: rank
|
||||
fig=(set narc) :: identities
|
||||
loc=(unit ,[p=@da q=@ud r=clip]) :: last position
|
||||
sym=(set ,[p=@ q=@uvH]) :: symmetric keys?
|
||||
wyl=will :: crypto will
|
||||
== ::
|
||||
-- ::
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~
|
||||
::
|
||||
++ stay :: save w+o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo noun)]
|
||||
!!
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user