ames: add -pine thread

This commit is contained in:
yosoyubik 2023-03-30 13:39:44 +02:00
parent 27c83ea067
commit ece5393829
2 changed files with 31 additions and 0 deletions

21
pkg/arvo/ted/pine.hoon Normal file
View File

@ -0,0 +1,21 @@
/- spider
/+ strandio
=, strand=strand:spider
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([~ arg=[ship path]] arg)
;< dat=(unit (cask)) bind:m
(pine:strandio arg)
?~ dat
(pure:m !>(~))
;< =bowl:spider bind:m get-bowl:strandio
=+ .^ =dais:clay %cb
/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[p.u.dat]
==
=/ res (mule |.((vale.dais q.u.dat)))
?: ?=(%| -.res)
~|(%pine-mark-fail (mean leaf+"-pine: ames vale fail {<mark>}" p.res))
(pure:m p.res)

View File

@ -344,6 +344,16 @@
?> ?=(%tune +<.sign)
(pure:m data.sign)
::
++ pine
|= [=ship =path]
=/ m (strand ,(unit (cask)))
^- form:m
=/ =card:agent:gall [%pass /pine %arvo %a %pine ship path]
;< ~ bind:m (send-raw-card card)
;< [wire sign=sign-arvo] bind:m take-sign-arvo
?> ?=(%tune +<.sign)
(pure:m data.sign)
::
++ sleep
|= for=@dr
=/ m (strand ,~)