mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
Merge remote-tracking branch 'origin/master' into philip/aquarium
This commit is contained in:
commit
462f027c16
@ -1 +1 @@
|
||||
https://ci-piers.urbit.org/zod-5294dec6408f8952d1a8e363362bbb58058852b6.tgz
|
||||
https://ci-piers.urbit.org/zod-0838dd9396cc6742e8bdd8dfee2e1bf5a782a50d.tgz
|
||||
|
@ -1 +1 @@
|
||||
8807423b01e586579946209828bb1bfa3d6d1c5e
|
||||
315634d99b0a0d7760267eacc0b32465e03ea981
|
||||
|
@ -9,7 +9,7 @@ var actions = runner.actions
|
||||
var args = ['-B', 'urbit.pill', '-A', '..', '-cSF', 'zod', 'zod'];
|
||||
var urbit = new Urbit(args);
|
||||
|
||||
// XX upstream the following into runner-js
|
||||
// XX upstream this into runner-js
|
||||
//
|
||||
function rePill(urb) {
|
||||
return new Promise(function(resolve,reject){
|
||||
@ -59,6 +59,11 @@ function rePill(urb) {
|
||||
|
||||
return read.pipe(write)
|
||||
})
|
||||
// XX find a better way to add this to the promise chain
|
||||
//
|
||||
.then(function(){
|
||||
return barMass(urb);
|
||||
})
|
||||
.catch(function(err){
|
||||
return reject(err)
|
||||
});
|
||||
@ -67,6 +72,16 @@ function rePill(urb) {
|
||||
})
|
||||
}
|
||||
|
||||
// XX upstream this into runner-js
|
||||
//
|
||||
function barMass(urb) {
|
||||
return urb.line("|mass")
|
||||
.then(function(){
|
||||
return urb.expectEcho("%ran-mass")
|
||||
.then(function(){ return urb.resetListeners(); })
|
||||
})
|
||||
}
|
||||
|
||||
Promise.resolve(urbit)
|
||||
// XX temporary
|
||||
// send ctrl-x to select dojo
|
||||
@ -79,9 +94,15 @@ Promise.resolve(urbit)
|
||||
.then(function() { return urbit })
|
||||
})
|
||||
.then(actions.safeBoot)
|
||||
.then(function(){
|
||||
return barMass(urbit);
|
||||
})
|
||||
.then(actions.test)
|
||||
.then(actions.testCores)
|
||||
.then(actions.testRenderers)
|
||||
.then(function(){
|
||||
return barMass(urbit);
|
||||
})
|
||||
.then(function(){
|
||||
return rePill(urbit);
|
||||
})
|
||||
|
871
app/dojo.hoon
871
app/dojo.hoon
File diff suppressed because it is too large
Load Diff
@ -31,11 +31,15 @@
|
||||
[%snap * ?]
|
||||
[ost.hid %snap /hi (snapshot:jael +<.val) +>.val]~
|
||||
::
|
||||
%look
|
||||
%look-ethnode
|
||||
:_ ~
|
||||
=/ pul
|
||||
(need (de-purl:html 'http://localhost:8545'))
|
||||
[ost.hid %look /hi |+pul]
|
||||
::
|
||||
[%look-kick who=@p]
|
||||
:_ ~
|
||||
[ost.hid %look /hi %& who.val]
|
||||
==
|
||||
::
|
||||
++ vein
|
||||
|
@ -498,7 +498,7 @@
|
||||
~/ %hall-action-create
|
||||
|= {nom/name des/cord typ/security}
|
||||
^+ ..ta-action
|
||||
?. (~(has in stories) nom)
|
||||
?. (~(has by stories) nom)
|
||||
%^ impact nom %new
|
||||
:* [[[our.bol nom] ~] ~ ~]
|
||||
des
|
||||
@ -516,7 +516,7 @@
|
||||
::
|
||||
~/ %hall-action-design
|
||||
|= {nom/name cof/config}
|
||||
?. (~(has in stories) nom)
|
||||
?. (~(has by stories) nom)
|
||||
(impact nom %new cof)
|
||||
(ta-evil (crip "{(trip nom)}: already exists"))
|
||||
::
|
||||
@ -2654,15 +2654,16 @@
|
||||
==
|
||||
::
|
||||
?: =(wat ~) &
|
||||
%- ~(has in wat)
|
||||
?+ -.det %hasnot
|
||||
$gram %grams
|
||||
$new %config-l
|
||||
$remove %config-l
|
||||
?+ -.det |
|
||||
$gram (~(has in wat) %grams)
|
||||
$new (~(has in wat) %config-l)
|
||||
$remove (~(has in wat) %config-l)
|
||||
$config ?: =(cir.det [our.bol nom])
|
||||
%config-l %config-r
|
||||
(~(has in wat) %config-l)
|
||||
(~(has in wat) %config-r)
|
||||
$status ?: =(cir.det [our.bol nom])
|
||||
%group-l %group-r
|
||||
(~(has in wat) %group-l)
|
||||
(~(has in wat) %group-r)
|
||||
==
|
||||
==
|
||||
::
|
||||
|
@ -141,6 +141,7 @@
|
||||
++ mere-kiln (wrap take-mere):from-kiln
|
||||
++ mere-kiln-sync (wrap take-mere-sync):from-kiln
|
||||
++ wake-kiln-overload (wrap take-wake-overload):from-kiln
|
||||
++ wake-helm-automass (wrap take-wake-automass):from-helm
|
||||
++ onto-drum (wrap take-onto):from-drum
|
||||
++ peer-drum (wrap peer):from-drum
|
||||
++ poke-atom (wrap poke-atom):from-helm
|
||||
@ -166,6 +167,8 @@
|
||||
++ poke-helm-tlon-add-fora (wrap poke-tlon-add-fora):from-helm
|
||||
++ poke-helm-tlon-add-stream (wrap poke-tlon-add-stream):from-helm
|
||||
++ poke-helm-tlon-init-stream (wrap poke-tlon-init-stream):from-helm
|
||||
++ poke-helm-automass (wrap poke-automass):from-helm
|
||||
++ poke-helm-cancel-automass (wrap poke-cancel-automass):from-helm
|
||||
++ poke-hood-sync (wrap poke-sync):from-kiln
|
||||
++ poke-kiln-commit (wrap poke-commit):from-kiln
|
||||
++ poke-kiln-info (wrap poke-info):from-kiln
|
||||
|
9
gen/dojo/wipe.hoon
Normal file
9
gen/dojo/wipe.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
:: wipe: poke dojo to wipe its state
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[~ ~]
|
||||
==
|
||||
[%wipe ~]
|
14
gen/hood/automass.hoon
Normal file
14
gen/hood/automass.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
:: Helm: show memory usage by vane, on a recurring timer
|
||||
::
|
||||
:::: /hoon/automass/hood/gen
|
||||
::
|
||||
/? 309
|
||||
::
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[recur=@dr ~]
|
||||
~
|
||||
==
|
||||
[%helm-automass recur]
|
13
gen/hood/cancel-automass.hoon
Normal file
13
gen/hood/cancel-automass.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/cancel-automass/hood/gen
|
||||
::
|
||||
/? 309
|
||||
::
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
~
|
||||
~
|
||||
==
|
||||
[%helm-cancel-automass ~]
|
@ -15,6 +15,7 @@
|
||||
++ session ::
|
||||
$: say/sole-share:sole :: console state
|
||||
mud/(unit (sole-dialog:sole @ud)) :: console dialog
|
||||
mass-timer/{way/wire nex/@da tim/@dr}
|
||||
== ::
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
@ -42,6 +43,8 @@
|
||||
{$nuke wire ship} ::
|
||||
{$serv wire ?(desk beam)} ::
|
||||
{$poke wire dock pear} ::
|
||||
{$rest wire @da} ::
|
||||
{$wait wire @da} ::
|
||||
== ::
|
||||
++ move (pair bone card) :: user-level move
|
||||
++ pear :: poke fruit
|
||||
@ -93,6 +96,25 @@
|
||||
|= ~ =< abet
|
||||
(emit %flog /heft %crud %hax-heft ~)
|
||||
::
|
||||
++ poke-automass
|
||||
|= recur=@dr
|
||||
=. 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)
|
||||
::
|
||||
++ take-wake-automass
|
||||
|= [way=wire ~]
|
||||
=. nex.mass-timer.sez (add now tim.mass-timer.sez)
|
||||
=< abet
|
||||
%- emil
|
||||
:~ [%flog /heft %crud %hax-heft ~]
|
||||
[%wait way.mass-timer.sez nex.mass-timer.sez]
|
||||
==
|
||||
::
|
||||
++ poke-send-hi
|
||||
|= {her/ship mes/(unit tape)} =< abet
|
||||
%^ emit %poke /helm/hi/(scot %p her)
|
||||
@ -154,9 +176,9 @@
|
||||
=+ way=?:(zus (welp top /sys/[nam]) (welp top /sys/vane/[nam]))
|
||||
=+ fil=.^(@ %cx (welp way /hoon))
|
||||
[%flog /reload [%veer ?:(=('z' tip) %$ tip) way fil]]
|
||||
:: +poke-reset: send %vega to reboot kernel
|
||||
:: +poke-reset: send %lyra to initiate kernel upgrade
|
||||
::
|
||||
:: And reinstall %zuse and the vanes.
|
||||
:: And reinstall %zuse and the vanes with %veer.
|
||||
:: Trigger with |reset.
|
||||
::
|
||||
++ poke-reset
|
||||
@ -167,7 +189,7 @@
|
||||
=/ top=path /(scot %p our)/home/(scot %da now)/sys
|
||||
=/ hun .^(@ %cx (welp top /hoon/hoon))
|
||||
=/ arv .^(@ %cx (welp top /arvo/hoon))
|
||||
:- [%flog /reset [%vega `@t`hun `@t`arv]]
|
||||
:- [%flog /reset [%lyra `@t`hun `@t`arv]]
|
||||
%+ turn
|
||||
(module-ova:pill top)
|
||||
|=(a=[wire flog:dill] [%flog a])
|
||||
|
@ -105,7 +105,7 @@
|
||||
[%leaf "expected %dude, but got {<-.actual>}"]~
|
||||
::
|
||||
%+ weld
|
||||
(expect-eq !>((error.expected)) !>((error.actual)))
|
||||
(expect-eq !>(error.expected) !>(error.actual))
|
||||
$(expected attempt.expected, actual attempt.actual)
|
||||
::
|
||||
%hood
|
||||
|
@ -1,6 +1,5 @@
|
||||
::
|
||||
/- json-rpc
|
||||
=, json-rpc
|
||||
=, rpc:jstd
|
||||
::
|
||||
|_ res=response
|
||||
::
|
||||
|
@ -1,8 +0,0 @@
|
||||
|%
|
||||
++ response ::TODO id should be optional
|
||||
$% [%result id=@t res=json]
|
||||
[%error id=@t code=@t message=@t] ::TODO data?
|
||||
[%fail hit=httr:eyre]
|
||||
[%batch bas=(list response)]
|
||||
==
|
||||
--
|
@ -540,6 +540,18 @@
|
||||
:: we emit ova to unix in fifo order, but emit internal moves depth-first
|
||||
::
|
||||
$(ova (weld ova p.nyx), mor (weld q.nyx t.mor))
|
||||
:: +spam: kick every vane with :ovum
|
||||
::
|
||||
++ spam
|
||||
|= [lac=? ovo=ovum]
|
||||
^- [(list ovum) (list [label=@tas =vane])]
|
||||
=/ card
|
||||
:+ %&
|
||||
[%cell [%atom %tas `%soft] %noun]
|
||||
[%soft q.ovo]
|
||||
%+ kick lac
|
||||
%+ turn vanes
|
||||
|=([label=@tas *] [label ~ [%pass p.ovo label card]])
|
||||
--
|
||||
--
|
||||
=< :: Arvo larval stage
|
||||
@ -656,12 +668,13 @@
|
||||
^- [(list ovum) *]
|
||||
=> .(+< ((hard ,[now=@da ovo=ovum]) +<))
|
||||
=^ ova +>+.$ (^poke now ovo)
|
||||
=| out=(list ovum)
|
||||
|- ^- [(list ovum) *]
|
||||
?~ ova
|
||||
[~ +>.^$]
|
||||
[(flop out) +>.^$]
|
||||
:: upgrade the kernel
|
||||
::
|
||||
?: ?=(%vega -.q.i.ova)
|
||||
?: ?=(%lyra -.q.i.ova)
|
||||
%+ fall
|
||||
(vega now t.ova ({@ @} +.q.i.ova))
|
||||
[~ +>.^$]
|
||||
@ -669,10 +682,8 @@
|
||||
:: and passing the rest through as output
|
||||
::
|
||||
=^ vov +>+.^$ (feck now i.ova)
|
||||
?~ vov
|
||||
=? out ?=(^ vov) [+.vov out]
|
||||
$(ova t.ova)
|
||||
=/ avo $(ova t.ova)
|
||||
[[+.vov -.avo] +.avo]
|
||||
::
|
||||
++ wish |=(* (^wish ((hard @ta) +<))) :: 22
|
||||
--
|
||||
@ -693,20 +704,28 @@
|
||||
bud dub
|
||||
vanes (turn nyf |=({a/@tas b/vise} [a [b *worm]]))
|
||||
==
|
||||
=| out=(list ovum)
|
||||
|- ^- [(list ovum) _+>.^$]
|
||||
?~ ova
|
||||
[~ +>.^$]
|
||||
[(flop out) +>.^$]
|
||||
:: iterate over effects, handling those on arvo proper
|
||||
:: and passing the rest through as output
|
||||
::
|
||||
:: In practice, the pending effects after an upgrade
|
||||
:: are the %veer moves to install %zuse and the vanes.
|
||||
:: are the %veer moves to install %zuse and the vanes,
|
||||
:: plus a %vega notification that the upgrade is complete.
|
||||
::
|
||||
:: N.B. this implementation assumes that %vega will be
|
||||
:: at the end of :ova.
|
||||
::
|
||||
?: ?=(%vega -.q.i.ova)
|
||||
=^ zef vanes
|
||||
(~(spam (is our vil eny bud vanes) now) lac i.ova)
|
||||
$(out [i.ova out], ova (weld t.ova zef))
|
||||
::
|
||||
=^ vov +>.^$ (feck now i.ova)
|
||||
?~ vov
|
||||
=? out ?=(^ vov) [+.vov out]
|
||||
$(ova t.ova)
|
||||
=/ avo $(ova t.ova)
|
||||
[[+.vov -.avo] +.avo]
|
||||
::
|
||||
++ peek :: external inspect
|
||||
|= {now/@da hap/path}
|
||||
@ -845,16 +864,18 @@
|
||||
:* our
|
||||
now
|
||||
eny
|
||||
ova
|
||||
:: tack a notification onto the pending effects
|
||||
::
|
||||
(weld ova [`ovum`[/ %vega ~] ~])
|
||||
bud
|
||||
(turn vanes |=([label=@tas =vane] [label vase.vane]))
|
||||
==
|
||||
:: call into the new kernel
|
||||
::
|
||||
=/ out (slum gat sam)
|
||||
:: tack a reset notification onto the product
|
||||
:: add types to the product
|
||||
::
|
||||
[[[/ %vega ~] ((list ovum) -.out)] +.out]
|
||||
[((list ovum) -.out) +.out]
|
||||
:: +veer: install %zuse or a vane
|
||||
::
|
||||
:: Identity is in the sample so the larval stage
|
||||
|
@ -1335,10 +1335,26 @@
|
||||
?~ b
|
||||
a
|
||||
$(b t.b, a (put i.b))
|
||||
:: +has: does :b exist in :a?
|
||||
::
|
||||
++ has :: b exists in a check
|
||||
++ has
|
||||
~/ %has
|
||||
|* b/*
|
||||
|* b=*
|
||||
^- ?
|
||||
:: wrap extracted item type in a unit because bunting fails
|
||||
::
|
||||
:: If we used the real item type of _?^(a n.a !!) as the sample type,
|
||||
:: then hoon would bunt it to create the default sample for the gate.
|
||||
::
|
||||
:: However, bunting that expression fails if :a is ~. If we wrap it
|
||||
:: in a unit, the bunted unit doesn't include the bunted item type.
|
||||
::
|
||||
:: This way we can ensure type safety of :b without needing to perform
|
||||
:: this failing bunt. It's a hack.
|
||||
::
|
||||
%. [~ b]
|
||||
|= b=(unit _?>(?=(^ a) n.a))
|
||||
=> .(b ?>(?=(^ b) u.b))
|
||||
|- ^- ?
|
||||
?~ a
|
||||
|
|
||||
@ -7830,7 +7846,7 @@
|
||||
::
|
||||
[%tsld [%$ 6] p.mod]
|
||||
{$bspd *} $(mod p.mod)
|
||||
{$bssg *} p.mod
|
||||
{$bssg *} [%kthp q.mod p.mod]
|
||||
{$bsts *} [%ktts p.mod $(mod q.mod)]
|
||||
{$bsvt *} $(mod p.mod)
|
||||
{$bswt *} :: use last entry
|
||||
@ -7891,7 +7907,7 @@
|
||||
:: process annotations outside construct, to catch default
|
||||
::
|
||||
?: ?=($dbug -.mod) factory(mod q.mod, bug [p.mod bug])
|
||||
?: ?=($bssg -.mod) factory(mod q.mod, def `p.mod)
|
||||
?: ?=($bssg -.mod) factory(mod q.mod, def `[%kthp q.mod p.mod])
|
||||
^- hoon
|
||||
:: if we recognize an indirection
|
||||
::
|
||||
@ -8212,7 +8228,7 @@
|
||||
:: default
|
||||
::
|
||||
{$bssg *}
|
||||
relative(mod q.mod, def `p.mod)
|
||||
relative(mod q.mod, def `[%kthp q.mod p.mod])
|
||||
::
|
||||
:: choice, $?
|
||||
::
|
||||
@ -12114,7 +12130,7 @@
|
||||
|= [acc=_map [ty=type k=xkey]]
|
||||
=/ dest (~(get by refs.tbl) k)
|
||||
?^ dest (~(put by acc) ty u.dest)
|
||||
?. (~(has in live.tbl)) acc
|
||||
?. (~(has in live.tbl) k) acc
|
||||
(~(put in acc) ty k)
|
||||
::
|
||||
:: Rebuild the `xrays` table.
|
||||
@ -17007,7 +17023,7 @@
|
||||
::
|
||||
:::: 5e: caching compiler
|
||||
::
|
||||
++ wa !: :: cached compile
|
||||
++ wa :: cached compile
|
||||
|_ worm
|
||||
++ nell |=(ref/type (nest [%cell %noun %noun] ref)) :: nest in cell
|
||||
++ nest :: nest:ut, cached
|
||||
|
@ -1,4 +1,4 @@
|
||||
:: :: ames (4a), networking
|
||||
!: :: ames (4a), networking
|
||||
::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
@ -6,7 +6,7 @@
|
||||
=, ames
|
||||
:: this number needs to be below 8
|
||||
::
|
||||
=+ protocol-version=6
|
||||
=+ protocol-version=0
|
||||
|%
|
||||
+= move [p=duct q=(wind note:able gift:able)] :: local move
|
||||
:: |pact: internal packet structures
|
||||
@ -1506,6 +1506,9 @@
|
||||
wab.zac.fox (~(del by wab.zac.fox) who)
|
||||
==
|
||||
[[%wine who " has sunk"]~ fox]
|
||||
::
|
||||
%vega
|
||||
[~ fox]
|
||||
::
|
||||
%wake
|
||||
(~(wake am [our now fox ski]) hen)
|
||||
@ -1537,8 +1540,7 @@
|
||||
::
|
||||
++ wegh
|
||||
^- mass
|
||||
:- %ames
|
||||
:- %|
|
||||
:~ fox+[%& fox]
|
||||
:+ %ames %|
|
||||
:~ dot+&+fox
|
||||
==
|
||||
--
|
||||
|
@ -1,5 +1,5 @@
|
||||
:: %behn, just a timer
|
||||
::
|
||||
!:
|
||||
!? 164
|
||||
::
|
||||
=, behn
|
||||
@ -17,118 +17,90 @@
|
||||
+$ timer [date=@da =duct]
|
||||
--
|
||||
::
|
||||
=| behn-state
|
||||
=* state -
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
^?
|
||||
|% :: poke+peek pattern
|
||||
++ call :: handle request
|
||||
|= $: hen=duct
|
||||
type=*
|
||||
wrapped-task=(hobo task:able)
|
||||
==
|
||||
^- [(list move) _..^$]
|
||||
=> |%
|
||||
++ per-event
|
||||
=| moves=(list move)
|
||||
|= [[our=ship now=@da =duct] state=behn-state]
|
||||
::
|
||||
=/ =task:able
|
||||
?. ?=(%soft -.wrapped-task)
|
||||
wrapped-task
|
||||
((hard task:able) p.wrapped-task)
|
||||
|%
|
||||
:: %entry-points
|
||||
::
|
||||
|^ =^ moves state
|
||||
:: +born: handle urbit restart
|
||||
::
|
||||
?- -.task
|
||||
:: %crud: error report; hand off to %dill to be printed
|
||||
::
|
||||
%crud
|
||||
[[hen %slip %d %flog task]~ state]
|
||||
::
|
||||
:: %born: handle urbit restart
|
||||
::
|
||||
%born
|
||||
++ born
|
||||
^+ [moves state]
|
||||
:: store this duct for setting unix wakeup timers
|
||||
::
|
||||
=. unix-duct hen
|
||||
=. unix-duct.state duct
|
||||
:: process any elapsed timers and clear and reset :next-wake
|
||||
::
|
||||
=^ moves timers notify-clients
|
||||
(set-wake(next-wake ~) moves)
|
||||
=> notify-clients
|
||||
set-wake(next-wake.state ~)
|
||||
:: +crud: error report; hand off to %dill to be printed
|
||||
::
|
||||
:: %rest: cancel a timer, resetting :next-wake if needed
|
||||
++ crud
|
||||
|= [p=@tas q=tang]
|
||||
^+ [moves state]
|
||||
[[duct %slip %d %flog %crud p q]~ state]
|
||||
:: +rest: cancel the timer at :date, resetting :next-wake if needed
|
||||
::
|
||||
%rest
|
||||
=. timers (unset-timer [p.task hen])
|
||||
(set-wake ~)
|
||||
++ rest
|
||||
|= date=@da
|
||||
^+ [moves state]
|
||||
::
|
||||
:: %wait: set a new timer
|
||||
=. timers.state (unset-timer [date duct])
|
||||
set-wake
|
||||
:: +vega: learn of a kernel upgrade
|
||||
::
|
||||
%wait
|
||||
++ vega
|
||||
[moves state]
|
||||
:: +wait: set a new timer at :date, resetting :next-wake if needed
|
||||
::
|
||||
++ wait
|
||||
|= date=@da
|
||||
^+ [moves state]
|
||||
:: process elapsed timers first to maintain sort order
|
||||
::
|
||||
=^ moves timers notify-clients
|
||||
:: set the timer, then adjust :next-wake if needed
|
||||
=. event-core notify-clients
|
||||
=. timers.state (set-timer [date duct])
|
||||
set-wake
|
||||
:: +wake: unix says we should wake up; notify clients and set :next-wake
|
||||
::
|
||||
=. timers (set-timer [p.task hen])
|
||||
(set-wake moves)
|
||||
++ wake
|
||||
^+ [moves state]
|
||||
=> notify-clients
|
||||
set-wake(next-wake.state ~)
|
||||
:: +wegh: produce memory usage report for |mass
|
||||
::
|
||||
:: %wake: unix says wake up; notify clients and set next wakeup
|
||||
::
|
||||
%wake
|
||||
=^ moves timers notify-clients
|
||||
(set-wake(next-wake ~) moves)
|
||||
::
|
||||
:: %wegh: produce memory usage report for |mass
|
||||
::
|
||||
%wegh
|
||||
++ wegh
|
||||
^+ [moves state]
|
||||
:_ state :_ ~
|
||||
:^ hen %give %mass
|
||||
:- %behn
|
||||
:- %|
|
||||
:~ timers+[%& timers]
|
||||
==
|
||||
:^ duct %give %mass
|
||||
:+ %behn %|
|
||||
:~ timers+&+timers.state
|
||||
dot+&+state
|
||||
==
|
||||
:: %utilities
|
||||
::
|
||||
[moves ..^^$]
|
||||
:: +set-timer: set a timer, maintaining the sort order of the :timers list
|
||||
::+|
|
||||
::
|
||||
++ set-timer
|
||||
|= t=timer
|
||||
^+ timers
|
||||
::
|
||||
?~ timers
|
||||
~[t]
|
||||
:: timers at the same date form a fifo queue
|
||||
::
|
||||
?: (lth date.t date.i.timers)
|
||||
[t timers]
|
||||
::
|
||||
[i.timers $(timers t.timers)]
|
||||
:: +unset-timer: cancel a timer; if it already expired, no-op
|
||||
::
|
||||
++ unset-timer
|
||||
|= [t=timer]
|
||||
^+ timers
|
||||
:: if we don't have this timer, no-op; for debugging, add a printf here
|
||||
::
|
||||
?~ timers
|
||||
~
|
||||
?: =(i.timers t)
|
||||
t.timers
|
||||
::
|
||||
[i.timers $(timers t.timers)]
|
||||
++ event-core .
|
||||
:: +notify-clients: wake up vanes whose timers have expired
|
||||
::
|
||||
:: When we return the list moves to clients, we flop them so they're in
|
||||
:: the same order as they were in :timers.
|
||||
::
|
||||
++ notify-clients
|
||||
=| moves=(list move)
|
||||
|- ^+ [moves timers]
|
||||
=* timers timers.state
|
||||
|- ^+ event-core
|
||||
::
|
||||
?~ timers
|
||||
[(flop moves) timers]
|
||||
=. moves (flop moves)
|
||||
event-core
|
||||
::
|
||||
?: (gth date.i.timers now)
|
||||
[(flop moves) timers]
|
||||
=. moves (flop moves)
|
||||
event-core
|
||||
::
|
||||
%_ $
|
||||
timers t.timers
|
||||
@ -145,8 +117,11 @@
|
||||
:: handled by unix first which is incorrect.
|
||||
::
|
||||
++ set-wake
|
||||
|= moves=(list move)
|
||||
^+ [moves state]
|
||||
::
|
||||
=* next-wake next-wake.state
|
||||
=* timers timers.state
|
||||
=* unix-duct unix-duct.state
|
||||
:: if no timers, cancel existing wakeup timer or no-op
|
||||
::
|
||||
?~ timers
|
||||
@ -165,16 +140,83 @@
|
||||
::
|
||||
:_ state(next-wake `date.i.timers)
|
||||
[[unix-duct %give %doze `date.i.timers] moves]
|
||||
:: +set-timer: set a timer, maintaining the sort order of the :timers list
|
||||
::
|
||||
++ set-timer
|
||||
=* timers timers.state
|
||||
|= t=timer
|
||||
^+ timers
|
||||
::
|
||||
?~ timers
|
||||
~[t]
|
||||
:: ignore duplicates
|
||||
::
|
||||
?: =(t i.timers)
|
||||
timers
|
||||
:: timers at the same date form a fifo queue
|
||||
::
|
||||
?: (lth date.t date.i.timers)
|
||||
[t timers]
|
||||
::
|
||||
[i.timers $(timers t.timers)]
|
||||
:: +unset-timer: cancel a timer; if it already expired, no-op
|
||||
::
|
||||
++ unset-timer
|
||||
=* timers timers.state
|
||||
|= [t=timer]
|
||||
^+ timers
|
||||
:: if we don't have this timer, no-op; for debugging, add a printf here
|
||||
::
|
||||
?~ timers
|
||||
~
|
||||
?: =(i.timers t)
|
||||
t.timers
|
||||
::
|
||||
[i.timers $(timers t.timers)]
|
||||
--
|
||||
--
|
||||
::
|
||||
=| behn-state
|
||||
=* state -
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley]
|
||||
=* behn-gate .
|
||||
^?
|
||||
|%
|
||||
:: +call: handle a +task:able:behn request
|
||||
::
|
||||
++ call
|
||||
|= $: hen=duct
|
||||
type=*
|
||||
wrapped-task=(hobo task:able)
|
||||
==
|
||||
^- [(list move) _behn-gate]
|
||||
::
|
||||
=/ =task:able
|
||||
?. ?=(%soft -.wrapped-task)
|
||||
wrapped-task
|
||||
((hard task:able) p.wrapped-task)
|
||||
::
|
||||
=/ event-core (per-event [our now hen] state)
|
||||
::
|
||||
=^ moves state
|
||||
?- -.task
|
||||
%born born:event-core
|
||||
%crud (crud:event-core [p q]:task)
|
||||
%rest (rest:event-core date=p.task)
|
||||
%vega vega:event-core
|
||||
%wait (wait:event-core date=p.task)
|
||||
%wake wake:event-core
|
||||
%wegh wegh:event-core
|
||||
==
|
||||
[moves behn-gate]
|
||||
:: +load: migrate an old state to a new behn version
|
||||
::
|
||||
++ load
|
||||
|= old=*
|
||||
^+ ..^$
|
||||
?^ new=((soft behn-state) old)
|
||||
~& %behn-load-new
|
||||
..^$(state u.new)
|
||||
~& %behn-load-wipe
|
||||
..^$(state *behn-state)
|
||||
^+ behn-gate
|
||||
::
|
||||
~| %behn-load-fail
|
||||
behn-gate(state (behn-state old))
|
||||
:: +scry: view timer state
|
||||
::
|
||||
:: TODO: not referentially transparent w.r.t. elapsed timers,
|
||||
@ -189,9 +231,10 @@
|
||||
[~ ~ %tank !>(>timers<)]
|
||||
::
|
||||
++ stay state
|
||||
++ take :: process move
|
||||
++ take
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^+ [*(list move) ..^$]
|
||||
^- [(list move) _behn-gate]
|
||||
~| %behn-take-not-implemented
|
||||
!!
|
||||
--
|
||||
|
||||
|
@ -1811,7 +1811,7 @@
|
||||
|= [disc=disc:ford a=page]
|
||||
^- schematic:ford
|
||||
?. ?=($hoon p.a) [%vale [our %home] a]
|
||||
?. ?=(@t q.a) [%dude |.(>%weird-hoon<) %ride [%zpzp ~] %$ *cage]
|
||||
?. ?=(@t q.a) [%dude >%weird-hoon< %ride [%zpzp ~] %$ *cage]
|
||||
[%$ p.a [%atom %t ~] q.a]
|
||||
::
|
||||
:: Verify the foreign data is of the the mark it claims to be.
|
||||
@ -3981,6 +3981,8 @@
|
||||
::
|
||||
=. hoy.ruf (~(del by hoy.ruf) p.req)
|
||||
[(weld clear-ford-cache-moves cancel-moves) ..^$]
|
||||
::
|
||||
$vega [~ ..^$]
|
||||
::
|
||||
?($warp $werp)
|
||||
:: capture whether this read is on behalf of another ship
|
||||
@ -4024,14 +4026,14 @@
|
||||
$wegh
|
||||
:_ ..^$ :_ ~
|
||||
:^ hen %give %mass
|
||||
:- %clay
|
||||
:- %|
|
||||
:~ domestic+[%& rom.ruf]
|
||||
foreign+[%& hoy.ruf]
|
||||
:- %object-store :- %|
|
||||
:~ commits+[%& hut.ran.ruf]
|
||||
blobs+[%& lat.ran.ruf]
|
||||
:+ %clay %|
|
||||
:~ domestic+&+rom.ruf
|
||||
foreign+&+hoy.ruf
|
||||
:+ %object-store %|
|
||||
:~ commits+&+hut.ran.ruf
|
||||
blobs+&+lat.ran.ruf
|
||||
==
|
||||
dot+&+ruf
|
||||
==
|
||||
==
|
||||
::
|
||||
|
@ -1,4 +1,4 @@
|
||||
::
|
||||
!:
|
||||
:: dill (4d), terminal handling
|
||||
::
|
||||
|= pit/vase
|
||||
@ -19,6 +19,7 @@
|
||||
e/(unit mass) ::
|
||||
f/(unit mass) ::
|
||||
g/(unit mass) ::
|
||||
j/(unit mass) ::
|
||||
== ::
|
||||
== ::
|
||||
++ axon :: dill per duct
|
||||
@ -50,9 +51,9 @@
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
{$heft $~} ::
|
||||
{$init p/ship} ::
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$text p/tape} ::
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$vega p/@t q/@t} :: reboot by path
|
||||
{$verb $~} :: verbose mode
|
||||
== ::
|
||||
++ note-eyre ::
|
||||
@ -77,7 +78,7 @@
|
||||
snap=(unit snapshot:jael) :: head start
|
||||
== ::
|
||||
[%fake our=ship] :: boot fake
|
||||
:: XX wegh ::
|
||||
[%wegh ~]
|
||||
== ::
|
||||
++ note :: out request $->
|
||||
$% {$a note-ames} ::
|
||||
@ -120,6 +121,7 @@
|
||||
== ::
|
||||
++ sign-jael ::
|
||||
$% [%init p=ship] ::
|
||||
[%mass p=mass]
|
||||
== ::
|
||||
++ sign :: in result $<-
|
||||
$% {$a sign-ames} ::
|
||||
@ -156,8 +158,8 @@
|
||||
(crud p.kyz q.kyz)
|
||||
$blew (send %rez p.p.kyz q.p.kyz)
|
||||
$heft heft
|
||||
$lyra (dump kyz)
|
||||
$veer (dump kyz)
|
||||
$vega (dump kyz)
|
||||
$verb (dump kyz)
|
||||
==
|
||||
::
|
||||
@ -280,6 +282,7 @@
|
||||
[hen %pass /heft/eyre %e %wegh ~]
|
||||
[hen %pass /heft/ford %f %wegh ~]
|
||||
[hen %pass /heft/gall %g %wegh ~]
|
||||
[hen %pass /heft/jael %j %wegh ~]
|
||||
moz
|
||||
==
|
||||
==
|
||||
@ -374,8 +377,8 @@
|
||||
|= sih/sign
|
||||
^+ +>
|
||||
?- sih
|
||||
{?($a $b $c $e $f $g) $mass *}
|
||||
(wegt -.sih p.sih)
|
||||
{?($a $b $c $e $f $g $j) $mass *}
|
||||
(wegh -.sih p.sih)
|
||||
::
|
||||
{$a $nice *}
|
||||
:: ~& [%take-nice-ames sih]
|
||||
@ -425,17 +428,13 @@
|
||||
{$d $blit *}
|
||||
(done +.sih)
|
||||
==
|
||||
:: +wegh: receive a memory report from a vane and maybe emit full report
|
||||
::
|
||||
++ wegh
|
||||
^- mass
|
||||
:- %dill
|
||||
:- %|
|
||||
:~ all+[%& [hey dug]:all]
|
||||
==
|
||||
::
|
||||
++ wegt
|
||||
|= {lal/?($a $b $c $e $f $g) mas/mass}
|
||||
|= {lal/?($a $b $c $e $f $g $j) mas/mass}
|
||||
^+ +>
|
||||
:: update our listing of vane responses with this new one
|
||||
::
|
||||
=. hef.all
|
||||
?- lal
|
||||
$a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
|
||||
@ -444,19 +443,37 @@
|
||||
$e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
|
||||
$f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
|
||||
$g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
|
||||
$j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
|
||||
==
|
||||
:: if not all vanes have responded yet, no-op
|
||||
::
|
||||
?. ?& ?=(^ a.hef.all)
|
||||
?=(^ b.hef.all)
|
||||
?=(^ c.hef.all)
|
||||
?=(^ e.hef.all)
|
||||
?=(^ f.hef.all)
|
||||
?=(^ g.hef.all)
|
||||
?=(^ j.hef.all)
|
||||
==
|
||||
+>.$
|
||||
%+ done(hef.all [~ ~ ~ ~ ~ ~])
|
||||
%mass
|
||||
=> [hef.all d=wegh]
|
||||
[%vanes %| ~[u.a u.c d u.e u.f u.g u.b]]
|
||||
:: clear vane reports from our state before weighing ourself
|
||||
::
|
||||
:: Otherwise, the state of vanes printed after this one get absorbed
|
||||
:: into Dill's %dot catchall report.
|
||||
::
|
||||
=/ ven=(list mass) ~[u.a u.b u.c u.e u.g u.f u.j]:hef.all
|
||||
=> .(hef.all [~ ~ ~ ~ ~ ~ ~])
|
||||
:: wegh ourself now that our state doesn't include other masses
|
||||
::
|
||||
=/ self=mass
|
||||
:+ %dill %|
|
||||
:~ hey+&+hey.all
|
||||
dug+&+dug.all
|
||||
dot+&+all
|
||||
==
|
||||
:: produce the memory report for all vanes
|
||||
::
|
||||
(done %mass %vanes %| [self ven])
|
||||
--
|
||||
::
|
||||
++ ax :: make ++as
|
||||
@ -514,6 +531,10 @@
|
||||
::
|
||||
?: ?=(%sunk -.task)
|
||||
[~ ..^$]
|
||||
:: a %vega notification on kernel upgrade comes in on an unfamiliar duct
|
||||
::
|
||||
?: ?=(%vega -.task)
|
||||
[~ ..^$]
|
||||
::
|
||||
=/ nus (ax hen)
|
||||
?~ nus
|
||||
|
@ -1,4 +1,4 @@
|
||||
:: :: %eyre, http servant
|
||||
!: :: %eyre, http servant
|
||||
!? 164
|
||||
::::
|
||||
|= pit/vase
|
||||
@ -728,6 +728,8 @@
|
||||
==
|
||||
::
|
||||
$sunk +>
|
||||
::
|
||||
$vega +>
|
||||
::
|
||||
?($chis $this) :: inbound request
|
||||
%- emule |. ^+ ..apex
|
||||
@ -1160,7 +1162,7 @@
|
||||
|= [tea=whir live=? request=schematic:ford]
|
||||
%+ pass-note tea
|
||||
:* %f %build live
|
||||
[%dude |.([%leaf "eyre: execute {<tea>}"]) request]
|
||||
[%dude [%leaf "eyre: execute {(spud tea)}"] request]
|
||||
==
|
||||
::
|
||||
++ add-links :: x-urbit:// urls
|
||||
@ -2075,7 +2077,6 @@
|
||||
++ has-arm ~(has in (silt (sloe cor-type)))
|
||||
++ build
|
||||
%^ execute-turbo %core live=%.y
|
||||
:::+ %dude [|.(+)]:>%mod-samp<
|
||||
^- schematic:ford
|
||||
:+ %mute
|
||||
^- schematic:ford
|
||||
@ -2296,12 +2297,13 @@
|
||||
?: ?=($wegh -.task)
|
||||
:_ ..^$ :_ ~
|
||||
:^ hen %give %mass
|
||||
:- %eyre
|
||||
:- %|
|
||||
:~ dependencies+[%& liz] sessions+[%& wup] views+[%& wix]
|
||||
ducts+[%| ~[dead+[%& ded] proxy+[%& pox] outgoing+[%& ask]]]
|
||||
hosts+[%& dop]
|
||||
misc+[%& bol]
|
||||
:+ %eyre %|
|
||||
:~ dependencies+&+liz
|
||||
sessions+&+wup
|
||||
views+&+wix
|
||||
ducts+[%| ~[dead+&+ded proxy+&+pox outgoing+&+ask]]
|
||||
hosts+&+dop
|
||||
dot+&+bol
|
||||
==
|
||||
=+ ska=(sloy ski)
|
||||
=+ sky=|=({* *} `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
|
@ -1,5 +1,5 @@
|
||||
:: ford: build system vane
|
||||
::
|
||||
!:
|
||||
:: Ford is a functional reactive build system.
|
||||
::
|
||||
:: A Ford build is a function of the Urbit namespace and a date that
|
||||
@ -1771,7 +1771,7 @@
|
||||
:: to wake us up immediately. This has the advantage that Ford stops hard
|
||||
:: blocking the main Urbit event loop, letting other work be done.
|
||||
::
|
||||
++ execute-loop
|
||||
++ execute-loop !.
|
||||
~/ %execute-loop
|
||||
|= builds=(set build)
|
||||
^+ ..execute
|
||||
@ -1808,7 +1808,7 @@
|
||||
:: should run the candidate build this cycle through the +execute loop, we
|
||||
:: place it in :next-builds. +gather runs until it has no more candidates.
|
||||
::
|
||||
++ gather
|
||||
++ gather !.
|
||||
~/ %gather
|
||||
|= [builds=(set build) force=?]
|
||||
^+ ..execute
|
||||
@ -2080,7 +2080,7 @@
|
||||
:: +build-receipts. It is in +reduce where we take these +build-receipts
|
||||
:: and apply them to ..execute.
|
||||
::
|
||||
++ reduce
|
||||
++ reduce !.
|
||||
~/ %reduce
|
||||
|= build-receipts=(list build-receipt)
|
||||
^+ ..execute
|
||||
@ -3131,7 +3131,7 @@
|
||||
::
|
||||
++ make-dude
|
||||
~% %make-dude ..^^$ ~
|
||||
|= [error=(trap tank) attempt=schematic]
|
||||
|= [error=tank attempt=schematic]
|
||||
^- build-receipt
|
||||
::
|
||||
=/ attempt-build=^build [date.build attempt]
|
||||
@ -3143,7 +3143,7 @@
|
||||
?. ?=([%error *] u.attempt-result)
|
||||
(return-result u.attempt-result)
|
||||
::
|
||||
(return-error [$:error message.u.attempt-result])
|
||||
(return-error [error message.u.attempt-result])
|
||||
::
|
||||
++ make-hood
|
||||
~% %make-hood ..^^$ ~
|
||||
@ -6182,6 +6182,14 @@
|
||||
%sunk
|
||||
::
|
||||
[~ ford-gate]
|
||||
::
|
||||
:: %vega: learn of kernel upgrade
|
||||
::
|
||||
:: XX clear cache, rebuild live builds
|
||||
::
|
||||
%vega
|
||||
::
|
||||
[~ ford-gate]
|
||||
::
|
||||
:: %wipe: wipe stored builds, clearing :percent-to-remove of the entries
|
||||
::
|
||||
@ -6196,14 +6204,11 @@
|
||||
:_ ~
|
||||
:^ duct %give %mass
|
||||
^- mass
|
||||
:- %ford
|
||||
:- %|
|
||||
:~ ^- mass
|
||||
:+ (scot %p our) %|
|
||||
::
|
||||
:~ [%builds [%& builds.state.ax]]
|
||||
[%compiler-cache [%& compiler-cache.state.ax]]
|
||||
== ==
|
||||
:+ %ford %|
|
||||
:~ builds+&+builds.state.ax
|
||||
compiler-cache+&+compiler-cache.state.ax
|
||||
dot+&+ax
|
||||
==
|
||||
==
|
||||
:: +take: receive a response from another vane
|
||||
::
|
||||
|
@ -1,4 +1,4 @@
|
||||
:: :: %gall, agent execution
|
||||
!: :: %gall, agent execution
|
||||
!? 163
|
||||
::::
|
||||
|= pit/vase
|
||||
@ -1258,6 +1258,7 @@
|
||||
^- (unit @tas)
|
||||
?+ sep ~& [%ap-vain sep]
|
||||
~
|
||||
<<<<<<< HEAD
|
||||
%build `%f
|
||||
%cash `%a
|
||||
%conf `%g
|
||||
@ -1316,6 +1317,8 @@
|
||||
[~ ..^$(sys.mast.all hen)]
|
||||
::
|
||||
$sunk [~ ..^$]
|
||||
::
|
||||
$vega [~ ..^$]
|
||||
::
|
||||
$west
|
||||
?> ?=({?($ge $gh) @ ~} q.q.hic)
|
||||
@ -1331,15 +1334,15 @@
|
||||
::
|
||||
$wegh
|
||||
=/ =mass
|
||||
=* mas mast.all
|
||||
:+ (scot %p our) %|
|
||||
:~ [%foreign [%& sap.mast.all]]
|
||||
:+ %gall %|
|
||||
:~ foreign+&+sap.mast.all
|
||||
:+ %blocked %|
|
||||
(sort ~(tap by (~(run by wub.mast.all) |=(sofa [%& +<]))) aor)
|
||||
:+ %active %|
|
||||
(sort ~(tap by (~(run by bum.mast.all) |=(seat [%& +<]))) aor)
|
||||
dot+&+all
|
||||
==
|
||||
=/ =move [hen %give %mass %gall %| [mass ~]]
|
||||
=/ =move [hen %give %mass mass]
|
||||
[[move ~] ..^$]
|
||||
==
|
||||
::
|
||||
|
@ -865,6 +865,12 @@
|
||||
?< =(fak.own.sub ?=(^ tuf.own.sub))
|
||||
+>.$(moz [[hen %give %turf tuf.own.sub] moz])
|
||||
::
|
||||
:: learn of kernel upgrade
|
||||
:: [%vega ~]
|
||||
::
|
||||
%vega
|
||||
+>.$
|
||||
::
|
||||
:: watch private keys
|
||||
:: {$vein $~}
|
||||
::
|
||||
@ -889,6 +895,23 @@
|
||||
::
|
||||
$vine
|
||||
+>(yen (~(put in yen) hen))
|
||||
::
|
||||
%wegh
|
||||
%_ +>
|
||||
moz
|
||||
:_ moz
|
||||
^- move
|
||||
:^ hen %give %mass
|
||||
^- mass
|
||||
:+ %jael %|
|
||||
:~ yen+&+yen
|
||||
urb+&+urb
|
||||
sub+&+sub
|
||||
etn+&+etn
|
||||
sap+&+sap
|
||||
dot+&+lex
|
||||
==
|
||||
==
|
||||
::
|
||||
:: authenticated remote request
|
||||
:: {$west p/ship q/path r/*}
|
||||
|
@ -96,7 +96,17 @@
|
||||
|%
|
||||
++ rpc
|
||||
|%
|
||||
++ response ::TODO id should be optional
|
||||
+$ request
|
||||
$: id=@t
|
||||
method=@t
|
||||
params=request-params
|
||||
==
|
||||
::
|
||||
+$ request-params
|
||||
$% [%list (list json)]
|
||||
[%object (list (pair @t json))]
|
||||
==
|
||||
+$ response
|
||||
$~ [%fail *httr:eyre]
|
||||
$% [%result id=@t res=json]
|
||||
[%error id=@t code=@t message=@t] ::TODO data?
|
||||
@ -243,6 +253,7 @@
|
||||
{$kick p/@da} :: wake up
|
||||
{$nuke p/@p} :: toggle auto-block
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
{$wake ~} :: timer activate
|
||||
{$wegh ~} :: report memory
|
||||
{$west p/ship q/path r/*} :: network request
|
||||
@ -424,6 +435,7 @@
|
||||
$% {$born ~} :: new unix process
|
||||
{$crud p/@tas q/(list tank)} :: error with trace
|
||||
{$rest p/@da} :: cancel alarm
|
||||
{$vega ~} :: report upgrade
|
||||
{$wait p/@da} :: set alarm
|
||||
{$wake ~} :: timer activate
|
||||
{$wegh ~} :: report memory
|
||||
@ -476,6 +488,7 @@
|
||||
{$ogre pot/$@(desk beam)} :: delete mount point
|
||||
{$perm des/desk pax/path rit/rite} :: change permissions
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
{$warp wer/ship rif/riff} :: internal file req
|
||||
{$werp who/ship wer/ship rif/riff} :: external file req
|
||||
{$wegh ~} :: report memory
|
||||
@ -620,10 +633,10 @@
|
||||
{$burl p/@t} :: activate url
|
||||
{$init p/@p} :: set owner
|
||||
{$logo ~} :: logout
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$mass p/mass} :: memory usage
|
||||
{$send p/lane:ames q/@} :: transmit packet
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$vega p/@t q/@t} :: reboot
|
||||
{$verb ~} :: verbose mode
|
||||
== ::
|
||||
++ task :: in request ->$
|
||||
@ -638,12 +651,13 @@
|
||||
{$hook ~} :: this term hung up
|
||||
{$harm ~} :: all terms hung up
|
||||
{$init p/ship} :: after gall ready
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$noop ~} :: no operation
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
{$talk p/tank} ::
|
||||
{$text p/tape} ::
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$vega p/@t q/@t} :: reboot
|
||||
{$vega ~} :: report upgrade
|
||||
{$verb ~} :: verbose mode
|
||||
== ::
|
||||
-- ::able
|
||||
@ -701,9 +715,9 @@
|
||||
++ flog :: sent to %dill
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
{$heft ~} ::
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$text p/tape} ::
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$vega p/@t q/@t} :: reboot
|
||||
{$verb ~} :: verbose mode
|
||||
== ::
|
||||
-- ::dill
|
||||
@ -742,6 +756,7 @@
|
||||
[%chis p=? q=clip r=httq] :: IPC inbound request
|
||||
[%this p=? q=clip r=httq] :: inbound request
|
||||
[%thud ~] :: inbound cancel
|
||||
[%vega ~] :: report upgrade
|
||||
[%wegh ~] :: report memory
|
||||
[%well p=path q=(unit mime)] :: put/del .well-known
|
||||
[%west p=ship q=[path *]] :: network request
|
||||
@ -978,6 +993,9 @@
|
||||
:: %sunk: receive a report that a foreign ship has lost continuity
|
||||
::
|
||||
[%sunk =ship =rift]
|
||||
:: %vega: report kernel upgrade
|
||||
::
|
||||
[%vega ~]
|
||||
:: %wegh: produce memory usage information
|
||||
::
|
||||
[%wegh ~]
|
||||
@ -1205,7 +1223,7 @@
|
||||
$: %dude
|
||||
:: error: a trap producing an error message to wrap the original
|
||||
::
|
||||
error=(trap tank)
|
||||
error=tank
|
||||
:: attempt: the schematic to try, whose error we wrap, if any
|
||||
::
|
||||
attempt=schematic
|
||||
@ -1669,6 +1687,7 @@
|
||||
{$init p/ship} :: set owner
|
||||
{$deal p/sock q/cush} :: full transmission
|
||||
{$sunk p=ship q/rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
{$west p/ship q/path r/*} :: network request
|
||||
{$wegh ~} :: report memory
|
||||
== ::
|
||||
@ -1787,6 +1806,7 @@
|
||||
== == ::
|
||||
++ gift :: out result <-$
|
||||
$% [%init p=ship] :: report install unix
|
||||
[%mass p=mass] :: memory usage report
|
||||
[%mack p=(unit tang)] :: message n/ack
|
||||
[%pubs public] :: public keys
|
||||
[%turf turf=(list turf)] :: domains
|
||||
@ -1859,10 +1879,12 @@
|
||||
[%meet =ship =life =pass] :: met after breach
|
||||
[%snap snap=snapshot kick=?] :: load snapshot
|
||||
[%turf ~] :: view domains
|
||||
[%vega ~] :: report upgrade
|
||||
[%vein ~] :: view signing keys
|
||||
[%vent ~] :: view ethereum events
|
||||
[%vest ~] :: view public balance
|
||||
[%vine ~] :: view secret history
|
||||
[%wegh ~] :: memory usage request
|
||||
[%west p=ship q=path r=*] :: remote request
|
||||
[%wind p=@ud] :: rewind before block
|
||||
== ::
|
||||
@ -5933,7 +5955,7 @@
|
||||
%+ welp tam
|
||||
=- ?~(att rez [' ' (attr att rez)])
|
||||
^- rez/tape
|
||||
?: &(?=(~ c.mex) |(cot (clot man)))
|
||||
?: &(?=(~ c.mex) |(cot ?^(man | (clot man))))
|
||||
[' ' '/' '>' rez]
|
||||
:- '>'
|
||||
(many c.mex :(weld "</" tam ">" rez))
|
||||
@ -7972,6 +7994,8 @@
|
||||
^- json
|
||||
%- pairs
|
||||
=; r=[met=@t pas=(list json)]
|
||||
::TODO should use request-to-json:rpc:jstd,
|
||||
:: and probably (fall riq -.req)
|
||||
:* jsonrpc+s+'2.0'
|
||||
method+s+met.r
|
||||
params+a+pas.r
|
||||
@ -8168,6 +8192,43 @@
|
||||
(rash (rsh 3 2 a) hex)
|
||||
--
|
||||
::
|
||||
:: |jstd: json standard library
|
||||
::
|
||||
++ jstd
|
||||
=, ^jstd
|
||||
|%
|
||||
++ rpc
|
||||
=, ^rpc
|
||||
|%
|
||||
++ request-to-hiss
|
||||
|= [url=purl:eyre req=request]
|
||||
^- hiss:eyre
|
||||
:- url
|
||||
:+ %post
|
||||
%- ~(gas in *math:eyre)
|
||||
~['Content-Type'^['application/json']~]
|
||||
%- some
|
||||
%- as-octt:mimes:html
|
||||
(en-json:html (request-to-json req))
|
||||
::
|
||||
++ request-to-json
|
||||
|= request
|
||||
^- json
|
||||
%- pairs:enjs:format
|
||||
:~ jsonrpc+s+'0.2'
|
||||
id+s+id
|
||||
method+s+method
|
||||
::
|
||||
:- %params
|
||||
^- json
|
||||
?- -.params
|
||||
%list [%a +.params]
|
||||
%object [%o (~(gas by *(map @t json)) +.params)]
|
||||
==
|
||||
==
|
||||
--
|
||||
--
|
||||
::
|
||||
:: |dawn: pre-boot request/response de/serialization and validation
|
||||
::
|
||||
++ dawn
|
||||
|
@ -1980,7 +1980,7 @@
|
||||
++ test-dude ^- tang
|
||||
::
|
||||
=/ schematic=schematic:ford-gate
|
||||
:* %dude |.(>%test-no-error<)
|
||||
:* %dude >%test-no-error<
|
||||
[%scry [%c care=%x bel=[[~nul %desk] /bar/foo]]]
|
||||
==
|
||||
::
|
||||
@ -2007,7 +2007,7 @@
|
||||
++ test-dude-error ^- tang
|
||||
::
|
||||
=/ schematic=schematic:ford-gate
|
||||
:* %dude |.(>%in-the-error-message<)
|
||||
:* %dude >%in-the-error-message<
|
||||
[%scry [%c care=%x bel=[[~nul %desk] /bar/foo]]]
|
||||
==
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user