diff --git a/pkg/arvo/age/language-server.hoon b/pkg/arvo/age/language-server.hoon index 3cbd1a1a5..7497cd762 100644 --- a/pkg/arvo/age/language-server.hoon +++ b/pkg/arvo/age/language-server.hoon @@ -63,7 +63,7 @@ =^ cards state ?+ mark (on-poke:def mark vase) %handle-http-request - (handle-http-request:lsp !<([eyre-id=@ta inbound-request:eyre vase)) + (handle-http-request:lsp !<([eyre-id=@ta inbound-request:eyre] vase)) == [cards this] :: @@ -126,6 +126,7 @@ :: ++ handle-http-request |= [eyre-id=@ta =inbound-request:eyre] + ^- (quip card _state) ?> ?=(^ body.request.inbound-request) =/ =lsp-req %- parser @@ -138,6 +139,7 @@ == =. bufs (~(put by bufs) uri.lsp-req buf) + :_ state %+ give-simple-payload:app eyre-id %+ require-authorization:app inbound-request |= =inbound-request:eyre diff --git a/pkg/arvo/imp/aqua/eyre-azimuth.hoon b/pkg/arvo/imp/aqua/eyre-azimuth.hoon index 53cfa06b1..9f39667ad 100644 --- a/pkg/arvo/imp/aqua/eyre-azimuth.hoon +++ b/pkg/arvo/imp/aqua/eyre-azimuth.hoon @@ -20,15 +20,17 @@ -- =; core ^- imp:spider - |= =bowl:spider - =/ m (thread ,~) + |= [=bowl:spider args=vase] + =/ m (thread ,vase) ^- form:m - ;< ~ bind:m (subscribe-our:threadio /effects %aqua /effect) - %- (main-loop:threadio ,state) - :~ |=(=state ~(handle-unix-effect core state)) - |=(=state ~(handle-poke core state)) - pure:(thread ,state) - == + ;< ~ bind:m (watch-our:threadio /effects %aqua /effect) + ;< ~ bind:m + %- (main-loop:threadio ,state) + :~ |=(=state ~(handle-unix-effect core state)) + |=(=state ~(handle-poke core state)) + pure:(thread ,state) + == + (pure:m *vase) :: |_ =state ++ handle-unix-effect diff --git a/pkg/arvo/imp/azimuth-tracker.hoon b/pkg/arvo/imp/azimuth-tracker.hoon index 9dd619e3e..1ec5ccfef 100644 --- a/pkg/arvo/imp/azimuth-tracker.hoon +++ b/pkg/arvo/imp/azimuth-tracker.hoon @@ -292,7 +292,7 @@ :: Main :: ^- imp:spider -|= =bowl:spider +|= [=bowl:spider args=vase] =/ m (thread ,vase) ^- form:m ;< ~ bind:m diff --git a/pkg/arvo/imp/azt.hoon b/pkg/arvo/imp/azt.hoon deleted file mode 100644 index b0622c534..000000000 --- a/pkg/arvo/imp/azt.hoon +++ /dev/null @@ -1,17 +0,0 @@ -/- spider -/+ *threadio -=, thread=thread:libthread -^- imp:spider -|= [=bowl:spider =vase] -=/ m (thread ,vase) -^- form:m -~& > 'starting azt' -=/ url 'http://eth-mainnet.urbit.org:8545' -=/ poke-vase !>([%azimuth-tracker %azimuth-tracker-poke !>([%watch url])]) -;< ~ bind:m (poke-our %spider %spider-imput poke-vase) -;< ~ bind:m (watch-our /sub %spider /imp/azimuth-tracker) -|- ^- form:m -=* loop $ -;< [=mark =vase] bind:m (take-fact /sub) -%- (slog (sell vase) ~) -loop diff --git a/pkg/arvo/imp/ph/breach-hi.hoon b/pkg/arvo/imp/ph/breach-hi.hoon index c18709a76..bba7d8b18 100644 --- a/pkg/arvo/imp/ph/breach-hi.hoon +++ b/pkg/arvo/imp/ph/breach-hi.hoon @@ -15,4 +15,4 @@ ;< ~ bind:m (real-ship ~dev) ;< ~ bind:m (wait-for-output ~bud "hi ~dev successful") ;< ~ bind:m end-azimuth -(pure:m vase) +(pure:m *vase) diff --git a/pkg/arvo/lib/agent.hoon b/pkg/arvo/lib/agent.hoon deleted file mode 100644 index e683ff299..000000000 --- a/pkg/arvo/lib/agent.hoon +++ /dev/null @@ -1,89 +0,0 @@ -|* [state=mold in-poke-data=mold sign=mold] -|% -++ agent - => |% - +$ step (quip move:agent:mall state) - -- - $_ ^| - |_ [bowl:mall state] - ++ handle-init - *step - :: - ++ handle-prep - |~ old-state=vase - *step - :: - ++ handle-poke - |~ =in-poke-data - *step - :: - ++ handle-peer - |~ path - *step - :: - ++ handle-pull - |~ path - *step - :: - ++ handle-peek - |~ path - *(unit (unit cage)) - :: - ++ handle-mall - |~ [wire internal-gift:mall] - *step - :: - ++ handle-take - |~ [wire =sign] - *step - :: - ++ handle-lame - |~ [term tang] - *step - -- -++ agent-to-mall-agent - |= =a=agent - |^ ^- agent:mall - |_ [=bowl:mall state=vase] - ++ handle-init (ag-step handle-init:(ag-core bowl state)) - ++ handle-prep ((ag-pace ,vase) handle-prep:(ag-core bowl state)) - ++ handle-poke - |= in=cage - ~& poke-in=in - ~& !>(*in-poke-data) - =/ data=(unit in-poke-data) !<(in-poke-data q.in) - ?~ data - ~| [%agent-received-malformed-poke our.bowl dap.bowl] - !! - (ag-step (handle-poke:(ag-core bowl state) u.data)) - :: - ++ handle-peer ((ag-pace ,path) handle-peer:(ag-core bowl state)) - ++ handle-pull ((ag-pace ,path) handle-pull:(ag-core bowl state)) - ++ handle-peek handle-peek:(ag-core bowl state) - ++ handle-mall - %- (ag-pace ,[wire internal-gift:mall]) - handle-mall:(ag-core bowl state) - :: - ++ handle-take ((ag-pace ,[wire vase]) handle-take:(ag-core bowl state)) - ++ handle-lame ((ag-pace ,[term tang]) handle-lame:(ag-core bowl state)) - -- - :: - ++ ag-core - |= [=bowl:mall =state=vase] - =/ static-state !<(state state-vase) - ?~ static-state - ~| [%bad-state-type our.bowl dap.bowl] - !! - ~(. a-agent bowl u.static-state) - :: - ++ ag-step - |= =step:agent - [-.step !>(+.step)] - :: - ++ ag-pace - |* in=mold - |= fun=$-(in step:agent) - |= =in - (ag-step (fun in)) - -- --- diff --git a/pkg/arvo/lib/threadio.hoon b/pkg/arvo/lib/threadio.hoon index ae31f0415..73932b440 100644 --- a/pkg/arvo/lib/threadio.hoon +++ b/pkg/arvo/lib/threadio.hoon @@ -428,28 +428,27 @@ |= [crash-after=(unit @ud) computation=_*form:(thread (unit result))] =/ m (thread ,result) =| try=@ud - |^ |- ^- form:m - =* loop $ - ?: =(crash-after `try) - (thread-fail %retry-too-many ~) - ;< ~ bind:m (backoff try ~m1) - ;< res=(unit result) bind:m computation - ?^ res - (pure:m u.res) - loop(try +(try)) - :: - ++ backoff - |= [try=@ud limit=@dr] - =/ m (thread ,~) - ^- form:m - ;< eny=@uvJ bind:m get-entropy - %- sleep - %+ min limit - ?: =(0 try) ~s0 - %+ add - (mul ~s1 (bex (dec try))) - (mul ~s0..0001 (~(rad og eny) 1.000)) - -- + |- ^- form:m + =* loop $ + ?: =(crash-after `try) + (thread-fail %retry-too-many ~) + ;< ~ bind:m (backoff try ~m1) + ;< res=(unit result) bind:m computation + ?^ res + (pure:m u.res) + loop(try +(try)) +:: +++ backoff + |= [try=@ud limit=@dr] + =/ m (thread ,~) + ^- form:m + ;< eny=@uvJ bind:m get-entropy + %- sleep + %+ min limit + ?: =(0 try) ~s0 + %+ add + (mul ~s1 (bex (dec try))) + (mul ~s0..0001 (~(rad og eny) 1.000)) :: :: ---- :: diff --git a/pkg/arvo/mar/sole/effect.hoon b/pkg/arvo/mar/sole/effect.hoon index a2177296f..efd99a4a3 100644 --- a/pkg/arvo/mar/sole/effect.hoon +++ b/pkg/arvo/mar/sole/effect.hoon @@ -59,7 +59,6 @@ $txt (frond %txt (tape p.sef)) $tan (frond %tan (tape (wush 160 p.sef))) $det (frond %det json:~(grow mar-sole-change +.sef)) - $tab (frond %tab a+(turn p.sef |=([=cord tan=^tank] (pairs match+s+cord info+(tape ~(ram re tan)) ~)))) :: $pro %+ frond %pro