mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 15:13:25 +03:00
arvo: completes scry reform
This commit is contained in:
parent
4a96fd2ef1
commit
ff06ccd2b9
@ -98,11 +98,9 @@
|
||||
:: $move: cause and action
|
||||
:: $ovum: card with cause
|
||||
:: $roof: namespace
|
||||
:: $rook: meta-namespace
|
||||
:: $rook: meta-namespace (super advanced)
|
||||
:: +room: generic namespace
|
||||
:: $sley: namespace function
|
||||
:: $slyd: super advanced
|
||||
:: $slyt: old namespace
|
||||
:: $root: raw namespace
|
||||
:: +wind: kernel action builder
|
||||
:: $wire: event pretext
|
||||
:: +wite: kernel action/error builder
|
||||
@ -135,15 +133,7 @@
|
||||
%- unit :: ~: unknown
|
||||
%- unit :: ~ ~: invalid
|
||||
(cask a)
|
||||
::
|
||||
+$ sley
|
||||
$- [* (unit (set monk)) term beam]
|
||||
(unit (unit cage))
|
||||
+$ slyd
|
||||
$~ =>(~ |~(* ~))
|
||||
$- [* (unit (set monk)) term beam]
|
||||
(unit (unit (cask meta)))
|
||||
+$ slyt $-(^ (unit (unit)))
|
||||
+$ root $-(^ (unit (unit)))
|
||||
::
|
||||
++ wind
|
||||
|$ :: a: forward
|
||||
@ -331,55 +321,26 @@
|
||||
?. ?=([%$ case] u.ved) ~
|
||||
`(unit beam)`[~ [`ship`u.who `desk`u.des `case`p.u.ved] t.t.t.p]
|
||||
::
|
||||
++ en-sley
|
||||
|= =roof
|
||||
^- sley
|
||||
|= [typ=* fur=(unit (set monk)) ron=term bed=beam]
|
||||
=/ lyc=gang
|
||||
?~ fur ~
|
||||
:- ~
|
||||
%- ~(gas in *(set ship))
|
||||
(murn ~(tap in u.fur) |=(m=monk ?-(-.m %| ~, %& `p.m)))
|
||||
(roof lyc ron bed)
|
||||
::
|
||||
++ sloy
|
||||
:: +sloy: adapter from old style scrys to new style scrys
|
||||
::
|
||||
:: This does path parsing which shows up hot, but removing the last +slay
|
||||
:: here requires deeper interface changes.
|
||||
::
|
||||
!:
|
||||
~/ %sloy
|
||||
|= sod=slyd
|
||||
^- slyt
|
||||
++ look
|
||||
~/ %look
|
||||
|= [rof=roof lyc=gang]
|
||||
^- root
|
||||
~/ %in
|
||||
|= [ref=* raw=*]
|
||||
=+ pux=((soft path) raw)
|
||||
?~ pux ~
|
||||
?. ?=([@ @ @ @ *] u.pux) ~
|
||||
=+ :* hyr=?~(i.u.pux (some %$) (slaw %tas i.u.pux))
|
||||
fal=(slaw %p i.t.u.pux)
|
||||
dyc=?~(i.t.t.u.pux (some %$) (slaw %tas i.t.t.u.pux))
|
||||
ved=(slay i.t.t.t.u.pux)
|
||||
tyl=t.t.t.t.u.pux
|
||||
==
|
||||
?~ hyr ~
|
||||
?~ fal ~
|
||||
?~ dyc ~
|
||||
?. ?=(^ ved) ~
|
||||
=/ ron=@tas u.hyr
|
||||
=/ bed=beam
|
||||
[[u.fal u.dyc (case p.u.ved)] tyl]
|
||||
=/ bop=(unit (unit (cask meta)))
|
||||
(sod ref ~ ron bed)
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
:: XX figure out wth to do about hoon-version
|
||||
::
|
||||
?. ?& ?=([?(%151 %141) *] ref)
|
||||
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
|
||||
?~ pax=((soft path) raw) ~
|
||||
?~ u.pax ~
|
||||
=* cyr i.u.pax
|
||||
?~ bem=(de-beam t.u.pax) ~
|
||||
?. ((sane %tas) cyr) ~
|
||||
?~ dat=(rof lyc cyr u.bem) ~
|
||||
?~ u.dat [~ ~]
|
||||
=* vax q.u.u.dat
|
||||
?. ?& ?=(^ ref)
|
||||
=(hoon-version -.ref)
|
||||
-:(~(nets wa *worm) +.ref p.vax)
|
||||
==
|
||||
~>(%slog.[0 leaf+"arvo: scry-lost"] ~)
|
||||
[~ ~ +.q.u.u.bop]
|
||||
[~ ~ q.vax]
|
||||
:: +wyrd: kelvin negotiation
|
||||
::
|
||||
:: specified but unimplemented:
|
||||
|
@ -10082,7 +10082,7 @@
|
||||
::
|
||||
[%dtkt *]
|
||||
=+ nef=$(gen [%kttr p.gen])
|
||||
[p.nef [%12 [%1 %151 p.nef] q:$(gen q.gen, gol %noun)]]
|
||||
[p.nef [%12 [%1 hoon-version p.nef] q:$(gen q.gen, gol %noun)]]
|
||||
::
|
||||
[%dtls *] [(nice [%atom %$ ~]) [%4 q:$(gen p.gen, gol [%atom %$ ~])]]
|
||||
[%sand *] [(nice (play gen)) [%1 q.gen]]
|
||||
|
@ -730,7 +730,6 @@
|
||||
|= [now=@da eny=@ rof=roof]
|
||||
=* larval-gate .
|
||||
=* adult-core (adult-gate +<)
|
||||
=* scry-gate (en-sley rof)
|
||||
|%
|
||||
:: +call: handle request $task
|
||||
::
|
||||
@ -861,7 +860,6 @@
|
||||
|= [now=@da eny=@ rof=roof]
|
||||
=* ames-gate .
|
||||
=* veb veb.bug.ames-state
|
||||
=* scry-gate (en-sley rof)
|
||||
|%
|
||||
:: +call: handle request $task
|
||||
::
|
||||
@ -880,7 +878,7 @@
|
||||
* [%crud -.task tang.u.dud]
|
||||
==
|
||||
::
|
||||
=/ event-core (per-event [now eny scry-gate] duct ames-state)
|
||||
=/ event-core (per-event [now eny rof] duct ames-state)
|
||||
::
|
||||
=^ moves ames-state
|
||||
=< abet
|
||||
@ -910,7 +908,7 @@
|
||||
~|(%ames-take-dud (mean tang.u.dud))
|
||||
::
|
||||
::
|
||||
=/ event-core (per-event [now eny scry-gate] duct ames-state)
|
||||
=/ event-core (per-event [now eny rof] duct ames-state)
|
||||
::
|
||||
=^ moves ames-state
|
||||
=< abet
|
||||
@ -1052,7 +1050,7 @@
|
||||
++ per-event
|
||||
=| moves=(list move)
|
||||
~% %event-gate ..per-event ~
|
||||
|= [[now=@da eny=@ scry-gate=sley] =duct =ames-state]
|
||||
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
||||
=* veb veb.bug.ames-state
|
||||
~% %event-core ..$ ~
|
||||
|%
|
||||
@ -1156,8 +1154,7 @@
|
||||
%- silt
|
||||
;; (list [@da ^duct])
|
||||
=< q.q %- need %- need
|
||||
%- scry-gate
|
||||
[[%141 %noun] ~ %b [[our %timers da+now] /]]
|
||||
(rof ~ %b [[our %timers da+now] /])
|
||||
=/ to-stir
|
||||
%+ skip next-real-wakes
|
||||
|= [=ship =bone =@da]
|
||||
@ -1659,8 +1656,7 @@
|
||||
^- ship
|
||||
;; ship
|
||||
=< q.q %- need %- need
|
||||
%- scry-gate
|
||||
[[%141 %noun] ~ %j `beam`[[our %sein %da now] /(scot %p who)]]
|
||||
(rof ~ %j `beam`[[our %sein %da now] /(scot %p who)])
|
||||
--
|
||||
:: +on-take-turf: relay %turf move from jael to unix
|
||||
::
|
||||
@ -1679,7 +1675,7 @@
|
||||
=/ turfs
|
||||
;; (list turf)
|
||||
=< q.q %- need %- need
|
||||
(scry-gate [%141 %noun] ~ %j `beam`[[our %turf %da now] /])
|
||||
(rof ~ %j `beam`[[our %turf %da now] /])
|
||||
::
|
||||
(emit unix-duct.ames-state %give %turf turfs)
|
||||
:: +on-trim: handle request to free memory
|
||||
|
@ -552,7 +552,7 @@
|
||||
++ per-server-event
|
||||
:: gate that produces the +per-server-event core from event information
|
||||
::
|
||||
|= [[eny=@ =duct now=@da scry=sley] state=server-state]
|
||||
|= [[eny=@ =duct now=@da rof=roof] state=server-state]
|
||||
=/ eyre-id (scot %ta (cat 3 'eyre_' (scot %uv (sham duct))))
|
||||
|%
|
||||
:: +request-local: bypass authentication for local lens connections
|
||||
@ -634,12 +634,12 @@
|
||||
%gen
|
||||
=/ bek=beak [our desk.generator.action da+now]
|
||||
=/ sup=spur path.generator.action
|
||||
=/ ski (scry [%141 %noun] ~ %ca bek sup)
|
||||
=/ ski (rof ~ %ca bek sup)
|
||||
=/ cag=cage (need (need ski))
|
||||
?> =(%vase p.cag)
|
||||
=/ gat=vase !<(vase q.cag)
|
||||
=/ res=toon
|
||||
%- mock :_ (sloy scry)
|
||||
%- mock :_ (look rof ~)
|
||||
:_ [%9 2 %0 1] |.
|
||||
%+ slam
|
||||
%+ slam gat
|
||||
@ -661,8 +661,7 @@
|
||||
authenticated.inbound-request.connection
|
||||
url.request.inbound-request.connection
|
||||
leaf+"scry blocked on"
|
||||
>p.res<
|
||||
~
|
||||
(fall (bind (bind ((soft path) p.res) smyt) (late ~)) ~)
|
||||
==
|
||||
=/ result ;;(simple-payload:http +.p.res)
|
||||
:: ensure we have a valid content-length header
|
||||
@ -757,7 +756,7 @@
|
||||
++ do-scry
|
||||
|= [care=term =desk =path]
|
||||
^- (unit (unit cage))
|
||||
(scry [%141 %noun] ~ care [our desk da+now] path)
|
||||
(rof ~ care [our desk da+now] path)
|
||||
::
|
||||
++ error-response
|
||||
|= [status=@ud =tape]
|
||||
@ -1017,7 +1016,7 @@
|
||||
++ code
|
||||
^- @ta
|
||||
=/ res=(unit (unit cage))
|
||||
(scry [%141 %noun] ~ %j [our %code da+now] /(scot %p our))
|
||||
(rof ~ %j [our %code da+now] /(scot %p our))
|
||||
(rsh 3 (scot %p ;;(@ q.q:(need (need res)))))
|
||||
:: +session-cookie-string: compose session cookie
|
||||
::
|
||||
@ -1613,7 +1612,7 @@
|
||||
::
|
||||
=* have=mark mark.event
|
||||
=/ val=(unit (unit cage))
|
||||
(scry [%141 %noun] ~ %cb [our %home da+now] /[have])
|
||||
(rof ~ %cb [our %home da+now] /[have])
|
||||
?. ?=([~ ~ *] val)
|
||||
((slog leaf+"eyre: no mark {(trip have)}" ~) ~)
|
||||
=+ !<(=dais:clay q.u.u.val)
|
||||
@ -1637,7 +1636,7 @@
|
||||
=* desc=tape "from {(trip have)} to json"
|
||||
=/ tube=(unit tube:clay)
|
||||
=/ tuc=(unit (unit cage))
|
||||
(scry [%141 %noun] ~ %cc [our %home da+now] /[have]/json)
|
||||
(rof ~ %cc [our %home da+now] /[have]/json)
|
||||
?. ?=([~ ~ *] tuc) ~
|
||||
`!<(tube:clay q.u.u.tuc)
|
||||
?~ tube
|
||||
@ -2098,7 +2097,6 @@
|
||||
:: a vane is activated with current date, entropy, and a namespace function
|
||||
::
|
||||
|= [now=@da eny=@uvJ rof=roof]
|
||||
=* scry-gate (en-sley rof)
|
||||
:: allow jets to be registered within this core
|
||||
::
|
||||
~% %http-server ..part ~
|
||||
@ -2140,7 +2138,7 @@
|
||||
:: XX cancel active too if =(0 trim-priority) ?
|
||||
::
|
||||
?: ?=(%trim -.task)
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
=* by-channel by-channel:(per-server-event event-args)
|
||||
=* channel-state channel-state.server-state.ax
|
||||
::
|
||||
@ -2188,7 +2186,7 @@
|
||||
[closed-connections server-state.ax]
|
||||
::
|
||||
=/ event-args
|
||||
[[eny duct.i.connections now scry-gate] server-state.ax]
|
||||
[[eny duct.i.connections now rof] server-state.ax]
|
||||
=/ cancel-request cancel-request:(per-server-event event-args)
|
||||
=^ moves server-state.ax cancel-request
|
||||
::
|
||||
@ -2210,7 +2208,7 @@
|
||||
~> %slog.[0 leaf+"eyre: code-changed: throwing away cookies and sessions"]
|
||||
=. authentication-state.server-state.ax *authentication-state
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
=* by-channel by-channel:(per-server-event event-args)
|
||||
=* channel-state channel-state.server-state.ax
|
||||
::
|
||||
@ -2226,7 +2224,7 @@
|
||||
::
|
||||
:: all other commands operate on a per-server-event
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
=/ server (per-server-event event-args)
|
||||
::
|
||||
?- -.task
|
||||
@ -2353,7 +2351,7 @@
|
||||
[~ http-server-gate]
|
||||
:: we have an error; propagate it to the client
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
=/ handle-gall-error
|
||||
handle-gall-error:(per-server-event event-args)
|
||||
=^ moves server-state.ax
|
||||
@ -2362,7 +2360,7 @@
|
||||
::
|
||||
++ watch-response
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
::
|
||||
?> ?=([@ *] t.wire)
|
||||
?: ?=([%g %unto %watch-ack *] sign)
|
||||
@ -2407,7 +2405,7 @@
|
||||
::
|
||||
++ channel
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] server-state.ax]
|
||||
=/ event-args [[eny duct now rof] server-state.ax]
|
||||
:: channel callback wires are triples.
|
||||
::
|
||||
?> ?=([@ @ @t *] wire)
|
||||
@ -2549,7 +2547,7 @@
|
||||
:^ ~ ~ %noun
|
||||
!> ^- ?
|
||||
%- =< request-is-logged-in:authentication
|
||||
(per-server-event [eny *duct now scry-gate] server-state.ax)
|
||||
(per-server-event [eny *duct now rof] server-state.ax)
|
||||
%*(. *request:http header-list ['cookie' u.cookies]~)
|
||||
==
|
||||
?. ?=(%$ ren)
|
||||
|
@ -143,7 +143,6 @@
|
||||
|= [now=@da eny=@uvJ rof=roof]
|
||||
=* pupal-gate .
|
||||
=* adult-core (adult-gate +<)
|
||||
=* ski (en-sley rof)
|
||||
=< |%
|
||||
++ call ^call
|
||||
++ load ^load
|
||||
@ -239,7 +238,6 @@
|
||||
=| state=state-7
|
||||
|= [now=@da eny=@uvJ rof=roof]
|
||||
=* gall-payload .
|
||||
=* ski (en-sley rof)
|
||||
=< ~% %gall-wrap ..mo ~
|
||||
|%
|
||||
++ call ^call
|
||||
@ -384,7 +382,7 @@
|
||||
|= [dap=term =case:clay]
|
||||
^- (each agent tang)
|
||||
=/ bek=beak [our %home case]
|
||||
=/ sky (ski [%141 %noun] ~ %ca bek /app/[dap]/hoon)
|
||||
=/ sky (rof ~ %ca bek /app/[dap]/hoon)
|
||||
?~ sky |+[leaf+"gall: {<dap>} scry blocked"]~
|
||||
?~ u.sky |+[leaf+"gall: {<dap>} scry failed"]~
|
||||
=/ =cage u.u.sky
|
||||
@ -834,7 +832,7 @@
|
||||
::
|
||||
%raw-poke
|
||||
=/ =case:clay da+now
|
||||
=/ sky (ski [%141 %noun] ~ %cb [our %home case] /[mark.deal])
|
||||
=/ sky (rof ~ %cb [our %home case] /[mark.deal])
|
||||
?- sky
|
||||
?(~ [~ ~])
|
||||
=/ ror "gall: raw-poke fail :{(trip dap)} {<mark.deal>}"
|
||||
@ -856,7 +854,7 @@
|
||||
=/ =case:clay da+now
|
||||
=/ =mars:clay [p.cage mark]:deal
|
||||
=/ mars-path /[a.mars]/[b.mars]
|
||||
=/ sky (ski [%141 %noun] ~ %cc [our %home case] mars-path)
|
||||
=/ sky (rof ~ %cc [our %home case] mars-path)
|
||||
?- sky
|
||||
?(~ [~ ~])
|
||||
=/ ror "gall: poke cast fail :{(trip dap)} {<mars>}"
|
||||
@ -937,7 +935,7 @@
|
||||
::
|
||||
%d
|
||||
=/ =case:clay da+now
|
||||
=/ sky (ski [%141 %noun] ~ %cb [our %home case] /[mark.ames-response])
|
||||
=/ sky (rof ~ %cb [our %home case] /[mark.ames-response])
|
||||
?- sky
|
||||
?(~ [~ ~])
|
||||
=/ ror "gall: ames mark fail {<mark.ames-response>}"
|
||||
@ -1103,7 +1101,7 @@
|
||||
=/ =case:clay da+now
|
||||
=/ bek=beak [our %home case]
|
||||
=/ mars-path /[a.mars]/[b.mars]
|
||||
=/ sky (ski [%141 %noun] ~ %cc bek mars-path)
|
||||
=/ sky (rof ~ %cc bek mars-path)
|
||||
?- sky
|
||||
?(~ [~ ~])
|
||||
%- (slog leaf+"watch-as fact conversion find-fail" >sky< ~)
|
||||
@ -1264,7 +1262,7 @@
|
||||
=/ tub=(unit tube:clay)
|
||||
?: =(have want) `(bake same ^vase)
|
||||
=/ tuc=(unit (unit cage))
|
||||
(ski [%141 %noun] ~ %cc [our %home da+now] /[have]/[want])
|
||||
(rof ~ %cc [our %home da+now] /[have]/[want])
|
||||
?. ?=([~ ~ *] tuc) ~
|
||||
`!<(tube:clay q.u.u.tuc)
|
||||
?~ tub
|
||||
@ -1539,7 +1537,7 @@
|
||||
++ ap-mule
|
||||
|= run=_^?(|.(*step:agent))
|
||||
^- (each step:agent tang)
|
||||
=/ res (mock [run %9 2 %0 1] (sloy ski))
|
||||
=/ res (mock [run %9 2 %0 1] (look rof ~))
|
||||
?- -.res
|
||||
%0 [%& !<(step:agent [-:!>(*step:agent) p.res])]
|
||||
%1 [%| (smyt ;;(path p.res)) ~]
|
||||
@ -1550,7 +1548,7 @@
|
||||
++ ap-mule-peek
|
||||
|= run=_^?(|.(*(unit (unit cage))))
|
||||
^- (each (unit (unit cage)) tang)
|
||||
=/ res (mock [run %9 2 %0 1] (sloy ski))
|
||||
=/ res (mock [run %9 2 %0 1] (look rof ~))
|
||||
?- -.res
|
||||
%0 [%& !<((unit (unit cage)) [-:!>(*(unit (unit cage))) p.res])]
|
||||
%1 [%| (smyt ;;(path p.res)) ~]
|
||||
|
@ -102,7 +102,7 @@
|
||||
:: +per-client-event: per-event client core
|
||||
::
|
||||
++ per-client-event
|
||||
|= [[eny=@ =duct now=@da scry=sley] =state]
|
||||
|= [[eny=@ =duct now=@da rof=roof] =state]
|
||||
|%
|
||||
:: +request: makes an external web request
|
||||
::
|
||||
@ -298,7 +298,6 @@
|
||||
:: a vane is activated with current date, entropy, and a namespace function
|
||||
::
|
||||
|= [now=@da eny=@uvJ rof=roof]
|
||||
=* scry-gate (en-sley rof)
|
||||
:: allow jets to be registered within this core
|
||||
::
|
||||
~% %http-client ..part ~
|
||||
@ -331,7 +330,7 @@
|
||||
?: ?=(%vega -.task)
|
||||
[~ light-gate]
|
||||
::
|
||||
=/ event-args [[eny duct now scry-gate] state.ax]
|
||||
=/ event-args [[eny duct now rof] state.ax]
|
||||
=/ client (per-client-event event-args)
|
||||
?- -.task
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user