mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
Merge branch 'pipe' into web-stream
pull :pipe event->talk multiplexer
This commit is contained in:
commit
492718f5db
@ -2,7 +2,7 @@
|
|||||||
:::: /hoon/dojo/app :: ::::
|
:::: /hoon/dojo/app :: ::::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
/? 314 :: arvo kelvin
|
/? 314 :: arvo kelvin
|
||||||
/- sole :: console structures
|
/- sole, lens :: console structures
|
||||||
/+ sole :: console library
|
/+ sole :: console library
|
||||||
[. sole]
|
[. sole]
|
||||||
:: :: ::
|
:: :: ::
|
||||||
@ -165,7 +165,7 @@
|
|||||||
++ dp-sink
|
++ dp-sink
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(plug (cold %file tar) dp-beam)
|
;~(plug (cold %file tar) dp-beam)
|
||||||
;~(plug (cold %flat pat) (most fas qut))
|
;~(plug (cold %flat pat) (most fas sym))
|
||||||
;~(plug (cold %pill dot) (most fas sym))
|
;~(plug (cold %pill dot) (most fas sym))
|
||||||
;~(plug (cold %http lus) (stag %post dp-iden-url))
|
;~(plug (cold %http lus) (stag %post dp-iden-url))
|
||||||
;~(plug (cold %http hep) (stag %put dp-iden-url))
|
;~(plug (cold %http hep) (stag %put dp-iden-url))
|
||||||
@ -970,6 +970,88 @@
|
|||||||
$clr he-pine(buf "")
|
$clr he-pine(buf "")
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ he-lens
|
||||||
|
|= com/command:lens
|
||||||
|
^+ +>
|
||||||
|
=+ ^- source/dojo-source
|
||||||
|
=| num/@
|
||||||
|
=- ?. ?=($send-api -.sink.com) :: XX num is incorrect
|
||||||
|
sor
|
||||||
|
:- 0
|
||||||
|
:+ %as `mark`(cat 3 api.sink.com '-poke')
|
||||||
|
:- 1
|
||||||
|
:+ %do
|
||||||
|
:+ %gill [%base %noun]
|
||||||
|
:^ %cont [%rock %tas %post]
|
||||||
|
[%rock %$ endpoint.sink.com]
|
||||||
|
[%make ~[[%.y 6]] ~]
|
||||||
|
sor
|
||||||
|
^= sor
|
||||||
|
|- ^- dojo-source
|
||||||
|
:- num
|
||||||
|
?- -.source.com
|
||||||
|
$data [%ex %sand %t data.source.com]
|
||||||
|
$dojo (rash command.source.com dp-build:dp)
|
||||||
|
$clay
|
||||||
|
:- %ex
|
||||||
|
:* %wish
|
||||||
|
[%base %noun]
|
||||||
|
:+ %cons
|
||||||
|
[%rock %tas %cx]
|
||||||
|
%+ rash pax.source.com
|
||||||
|
rood:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$url [%ur `~. url.source.com]
|
||||||
|
$api !!
|
||||||
|
$get-api
|
||||||
|
:* %ex
|
||||||
|
%wish
|
||||||
|
[%wing ~[%json]]
|
||||||
|
:* %conl
|
||||||
|
[%rock %tas %gx]
|
||||||
|
[%sand %ta (scot %p our.hid)]
|
||||||
|
[%sand %tas api.source.com]
|
||||||
|
[%sand %ta (scot %da now.hid)]
|
||||||
|
(turn endpoint.source.com |=(a/@t [%sand %ta a]))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$listen-api !!
|
||||||
|
$as
|
||||||
|
:* %as mar.source.com
|
||||||
|
$(num +(num), source.com next.source.com)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$hoon
|
||||||
|
:* %do
|
||||||
|
%+ rash code.source.com
|
||||||
|
tall:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
|
||||||
|
$(num +(num), source.com next.source.com)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$tuple
|
||||||
|
:- %tu
|
||||||
|
|- ^- (list dojo-source)
|
||||||
|
?~ next.source.com
|
||||||
|
~
|
||||||
|
=. num +(num)
|
||||||
|
:- ^$(source.com i.next.source.com)
|
||||||
|
$(next.source.com t.next.source.com)
|
||||||
|
==
|
||||||
|
=+ |- ^- sink/dojo-sink
|
||||||
|
?- -.sink.com
|
||||||
|
$stdout [%show %0]
|
||||||
|
$output-file $(sink.com [%command (cat 3 '@' pax.sink.com)])
|
||||||
|
$output-clay [%file (need (tome pax.sink.com))]
|
||||||
|
$url [%http %post `~. url.sink.com]
|
||||||
|
$to-api !!
|
||||||
|
$send-api [%poke our.hid api.sink.com]
|
||||||
|
$command (rash command.sink.com dp-sink:dp)
|
||||||
|
$app [%poke our.hid app.sink.com]
|
||||||
|
==
|
||||||
|
(he-plan sink source)
|
||||||
|
::
|
||||||
++ he-lame :: handle error
|
++ he-lame :: handle error
|
||||||
|= {wut/term why/tang}
|
|= {wut/term why/tang}
|
||||||
^+ +>
|
^+ +>
|
||||||
@ -1021,6 +1103,17 @@
|
|||||||
++ poke-sole-action
|
++ poke-sole-action
|
||||||
|= act/sole-action ~| poke+act %. act
|
|= act/sole-action ~| poke+act %. act
|
||||||
(wrap he-span):arm
|
(wrap he-span):arm
|
||||||
|
::
|
||||||
|
++ poke-lens-command
|
||||||
|
|= com/command:lens ~| poke-lens+com %. com
|
||||||
|
(wrap he-lens):arm
|
||||||
|
::
|
||||||
|
++ poke-json
|
||||||
|
|= jon/json
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
~& jon=jon
|
||||||
|
[~ +>.$]
|
||||||
|
::
|
||||||
++ made (wrap he-made):arm
|
++ made (wrap he-made):arm
|
||||||
++ sigh-httr (wrap he-sigh):arm
|
++ sigh-httr (wrap he-sigh):arm
|
||||||
++ sigh-tang |=({a/wire b/tang} ~|(`term`(cat 3 'sigh-' -.a) (mean b)))
|
++ sigh-tang |=({a/wire b/tang} ~|(`term`(cat 3 'sigh-' -.a) (mean b)))
|
||||||
|
@ -177,11 +177,12 @@
|
|||||||
:: into poke semantics.
|
:: into poke semantics.
|
||||||
::
|
::
|
||||||
++ poke-gh-poke
|
++ poke-gh-poke
|
||||||
|= {method/meth endpoint/path jon/json}
|
|= {method/meth endpoint/(list @t) jon/json}
|
||||||
^- {(list move) _+>.$}
|
^- {(list move) _+>.$}
|
||||||
:_ +>.$ :_ ~
|
:_ +>.$ :_ ~
|
||||||
:* ost.hid %hiss /poke/[method] `~ %httr %hiss
|
:* ost.hid %hiss /poke/[method] `~ %httr %hiss
|
||||||
(scan "https://api.github.com{<`path`endpoint>}" auri:epur)
|
~| stuff="https://api.github.com{<(path endpoint)>}"
|
||||||
|
(scan "https://api.github.com{<(path endpoint)>}" auri:epur)
|
||||||
method ~ `(taco (crip (pojo jon)))
|
method ~ `(taco (crip (pojo jon)))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
92
app/pipe.hoon
Normal file
92
app/pipe.hoon
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
/+ talk
|
||||||
|
!:
|
||||||
|
=> |%
|
||||||
|
++ move (pair bone card)
|
||||||
|
++ card
|
||||||
|
$% {$peel wire dock mark path}
|
||||||
|
{$poke wire dock $talk-command command:talk}
|
||||||
|
==
|
||||||
|
--
|
||||||
|
::
|
||||||
|
|_ {hid/bowl connections/(set {app/term source/path station/knot})}
|
||||||
|
++ poke-noun
|
||||||
|
|= arg/*
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
?: ?=($list arg)
|
||||||
|
(poke-pipe-list ~)
|
||||||
|
=+ ((soft {$cancel app/term source/path station/knot}) arg)
|
||||||
|
?^ -
|
||||||
|
(poke-pipe-cancel app.u source.u station.u)
|
||||||
|
=+ ((hard {app/term source/path station/knot}) arg)
|
||||||
|
(poke-pipe-connect app source station)
|
||||||
|
::
|
||||||
|
++ poke-pipe-list
|
||||||
|
|= $~
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
%- %- slog
|
||||||
|
%+ turn (~(tap in connections))
|
||||||
|
|= {app/term source/path station/knot}
|
||||||
|
leaf+"{(trip app)}{<`path`source>} ---> {(trip station)}"
|
||||||
|
[~ +>.$]
|
||||||
|
::
|
||||||
|
++ poke-pipe-cancel
|
||||||
|
|= {app/term source/path station/knot}
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
?. (~(has in connections) [app source station])
|
||||||
|
%- %- slog :~
|
||||||
|
leaf+"no connection:"
|
||||||
|
leaf+"{(trip app)}{<`path`source>} ---> {(trip station)}"
|
||||||
|
==
|
||||||
|
[~ +>.$]
|
||||||
|
%- %- slog :~
|
||||||
|
leaf+"canceling:"
|
||||||
|
leaf+"{(trip app)}{<`path`source>} ---> {(trip station)}"
|
||||||
|
==
|
||||||
|
[~ +>.$(connections (~(del in connections) [app source station]))]
|
||||||
|
::
|
||||||
|
++ poke-pipe-connect
|
||||||
|
|= {app/term source/path station/knot}
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
:_ +>.$(connections (~(put in connections) [app source station]))
|
||||||
|
:_ ~
|
||||||
|
~& [%peeling app source station]
|
||||||
|
:* ost.hid %peel [%subscribe app station source]
|
||||||
|
[our.hid app] %talk-speeches source
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ diff-talk-speeches
|
||||||
|
|= {way/wire speeches/(list speech:talk)}
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
?> ?=({$subscribe @ @ *} way)
|
||||||
|
=+ app=(slav %tas i.t.way)
|
||||||
|
=+ station=i.t.t.way
|
||||||
|
=+ source=t.t.t.way
|
||||||
|
?. (~(has in connections) [app source station])
|
||||||
|
%- %- slog :~
|
||||||
|
leaf+"pipe dropping:"
|
||||||
|
leaf+"{(trip app)}{<`path`source>} ---> {(trip station)}"
|
||||||
|
==
|
||||||
|
[~ +>.$]
|
||||||
|
:_ +>.$ :_ ~
|
||||||
|
:* ost.hid %poke [%relay app station source]
|
||||||
|
[our.hid %talk] %talk-command
|
||||||
|
%publish
|
||||||
|
|- ^- (list thought:talk)
|
||||||
|
?~ speeches
|
||||||
|
~
|
||||||
|
:_ $(speeches t.speeches, eny.hid (shax (cat 3 %pipe eny.hid)))
|
||||||
|
:* `@uvH`(end (sub 'H' 'A') 1 eny.hid)
|
||||||
|
[[[%& our.hid station] *envelope:talk %pending] ~ ~]
|
||||||
|
now.hid *(set flavor:talk) i.speeches
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ coup-relay
|
||||||
|
|= {way/wire saw/(unit tang)}
|
||||||
|
^- {(list move) _+>.$}
|
||||||
|
?> ?=({@ @ @ *} way)
|
||||||
|
?~ saw
|
||||||
|
[~ +>.$]
|
||||||
|
%- (slog leaf+"pipe relay failure in:" >way< u.saw)
|
||||||
|
[~ +>.$]
|
||||||
|
--
|
@ -2023,6 +2023,15 @@
|
|||||||
$url url+(crip (earf p.sep))
|
$url url+(crip (earf p.sep))
|
||||||
$mor mor+(turn p.sep |=(speech ^$(sep +<)))
|
$mor mor+(turn p.sep |=(speech ^$(sep +<)))
|
||||||
$fat [%mor $(sep q.sep) tan+(tr-rend-tors p.sep) ~]
|
$fat [%mor $(sep q.sep) tan+(tr-rend-tors p.sep) ~]
|
||||||
|
$api
|
||||||
|
:- %tan
|
||||||
|
:_ ~
|
||||||
|
:+ %rose
|
||||||
|
[": " ~ ~]
|
||||||
|
:~ leaf+"[{(trip id.sep)} on {(trip service.sep)}]"
|
||||||
|
leaf+(trip body.sep)
|
||||||
|
leaf+(earn url.sep)
|
||||||
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ tr-rend-tors
|
++ tr-rend-tors
|
||||||
@ -2095,6 +2104,9 @@
|
|||||||
::
|
::
|
||||||
$app
|
$app
|
||||||
(tr-chow 64 "[{(trip p.sep)}]: {(trip q.sep)}")
|
(tr-chow 64 "[{(trip p.sep)}]: {(trip q.sep)}")
|
||||||
|
::
|
||||||
|
$api
|
||||||
|
(tr-chow 64 "[{(trip id.sep)}@{(trip service.sep)}]: {(trip summary.sep)}")
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
== == ::
|
== == ::
|
||||||
$: $e :: to self
|
$: $e :: to self
|
||||||
$% {$thud $~} :: proxied death
|
$% {$thud $~} :: proxied death
|
||||||
{$this p/? q/clip r/httq} :: proxied request
|
{$this p/? r/clip s/httq} :: proxied request
|
||||||
{$meta vase:{$them (unit httr)}} :: type check
|
{$meta vase:{$them (unit httr)}} :: type check
|
||||||
== == ::
|
== == ::
|
||||||
$: $f :: to %ford
|
$: $f :: to %ford
|
||||||
@ -64,7 +64,7 @@
|
|||||||
{$ow p/ixor $~} :: dying view
|
{$ow p/ixor $~} :: dying view
|
||||||
{$on $~} :: dependency
|
{$on $~} :: dependency
|
||||||
== ::
|
== ::
|
||||||
++ whir-of {p/knot:ship q/term r/wire} :: path in dock
|
++ whir-of {p/knot:ship q/term r/?($mess $lens) s/wire} :: path in dock
|
||||||
++ whir-se ?($core vi-arm) :: build/call
|
++ whir-se ?($core vi-arm) :: build/call
|
||||||
++ vi-arm
|
++ vi-arm
|
||||||
$? $out :: ++out mod request
|
$? $out :: ++out mod request
|
||||||
@ -75,7 +75,7 @@
|
|||||||
-- ::
|
-- ::
|
||||||
|% :: models
|
|% :: models
|
||||||
++ bolo :: eyre state
|
++ bolo :: eyre state
|
||||||
$: $4 :: version
|
$: $5 :: version
|
||||||
gub/@t :: random identity
|
gub/@t :: random identity
|
||||||
hov/(unit ship) :: master for remote
|
hov/(unit ship) :: master for remote
|
||||||
top/beam :: ford serve prefix
|
top/beam :: ford serve prefix
|
||||||
@ -178,7 +178,7 @@
|
|||||||
?~ quy [%$ %n ~]~
|
?~ quy [%$ %n ~]~
|
||||||
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
|
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
|
||||||
::
|
::
|
||||||
++ gsig |=({a/dock b/path} [(scot %p p.a) q.a b])
|
++ gsig |=({a/dock b/?($mess $lens) c/path} [(scot %p p.a) q.a b c])
|
||||||
++ session-from-cookies
|
++ session-from-cookies
|
||||||
|= {nam/@t maf/math}
|
|= {nam/@t maf/math}
|
||||||
^- (unit hole)
|
^- (unit hole)
|
||||||
@ -599,7 +599,7 @@
|
|||||||
=. our ?~(hov p.kyz (min u.hov p.kyz))
|
=. our ?~(hov p.kyz (min u.hov p.kyz))
|
||||||
+>.$(hov [~ our], top [[our %home ud+0] /web])
|
+>.$(hov [~ our], top [[our %home ud+0] /web])
|
||||||
::
|
::
|
||||||
$this :: inbound request
|
?($chis $this) :: inbound request
|
||||||
%- emule |. ^+ ..apex
|
%- emule |. ^+ ..apex
|
||||||
=* sec p.kyz :: ? :: https bit
|
=* sec p.kyz :: ? :: https bit
|
||||||
=* heq r.kyz :: httq :: request content
|
=* heq r.kyz :: httq :: request content
|
||||||
@ -613,9 +613,11 @@
|
|||||||
[[sec (rash i.hot thor:epur)] p.ryp q.ryp]
|
[[sec (rash i.hot thor:epur)] p.ryp q.ryp]
|
||||||
==
|
==
|
||||||
=. p.p.pul |(p.p.pul ?=(hoke r.p.pul))
|
=. p.p.pul |(p.p.pul ?=(hoke r.p.pul))
|
||||||
|
?: ?=($chis -.kyz) :: IPC escape hatch
|
||||||
|
~(lens handle pul [q.+.kyz |] [p.heq maf s.heq])
|
||||||
=+ her=(host-to-ship r.p.pul)
|
=+ her=(host-to-ship r.p.pul)
|
||||||
?: |(?=($~ her) =(our u.her))
|
?: |(?=($~ her) =(our u.her))
|
||||||
(handle pul [q.+.kyz |] [p.heq maf s.heq])
|
~(apex handle pul [q.+.kyz |] [p.heq maf s.heq])
|
||||||
=+ han=(sham hen)
|
=+ han=(sham hen)
|
||||||
=. pox (~(put by pox) han hen)
|
=. pox (~(put by pox) han hen)
|
||||||
(ames-gram u.her [%get ~] han +.kyz)
|
(ames-gram u.her [%get ~] han +.kyz)
|
||||||
@ -750,6 +752,7 @@
|
|||||||
=+ cuf=`cuft`+>.sih
|
=+ cuf=`cuft`+>.sih
|
||||||
?- -.cuf
|
?- -.cuf
|
||||||
?($coup $reap)
|
?($coup $reap)
|
||||||
|
~? ?=($lens r.q.tee) hen=hen^hcuf=-.cuf
|
||||||
(get-ack:(ire-ix p.tee) q.tee ?~(p.cuf ~ `[-.cuf u.p.cuf]))
|
(get-ack:(ire-ix p.tee) q.tee ?~(p.cuf ~ `[-.cuf u.p.cuf]))
|
||||||
::
|
::
|
||||||
$doff !!
|
$doff !!
|
||||||
@ -911,7 +914,7 @@
|
|||||||
++ new-deps
|
++ new-deps
|
||||||
|= {a/@uvH b/(each duct ixor)} ^+ +>.$
|
|= {a/@uvH b/(each duct ixor)} ^+ +>.$
|
||||||
:: ~& new-deps+[a b]
|
:: ~& new-deps+[a b]
|
||||||
?: =(`@`0 a) +>.$
|
?: =(`@`~ a) +>.$
|
||||||
=+ had=(~(has by liz) a)
|
=+ had=(~(has by liz) a)
|
||||||
=. liz (~(put ju liz) a b)
|
=. liz (~(put ju liz) a b)
|
||||||
?: had +>.$
|
?: had +>.$
|
||||||
@ -983,12 +986,10 @@
|
|||||||
::
|
::
|
||||||
::
|
::
|
||||||
++ handle
|
++ handle
|
||||||
|= $: {hat/hart pok/pork quy/quay} :: purl parsed url
|
|_ $: {hat/hart pok/pork quy/quay} :: purl parsed url
|
||||||
{cip/clip aut/?} :: client ip nonymous?
|
{cip/clip aut/?} :: client ip nonymous?
|
||||||
{mef/meth maf/math bod/(unit octs)} :: method+headers+body
|
{mef/meth maf/math bod/(unit octs)} :: method+headers+body
|
||||||
==
|
==
|
||||||
=< apex
|
|
||||||
|%
|
|
||||||
++ abet ..handle
|
++ abet ..handle
|
||||||
++ done .
|
++ done .
|
||||||
++ teba |*(a/$-(* ..handle) |*(b/* %_(done ..handle (a b))))
|
++ teba |*(a/$-(* ..handle) |*(b/* %_(done ..handle (a b))))
|
||||||
@ -1015,6 +1016,13 @@
|
|||||||
?: ?=($| -.pez) p.pez
|
?: ?=($| -.pez) p.pez
|
||||||
(resolve ~ p.pez)
|
(resolve ~ p.pez)
|
||||||
::
|
::
|
||||||
|
++ lens
|
||||||
|
=< abet
|
||||||
|
:: (process-parsed [%mess [our %dojo] %lens-command /lens (need grab-json)])
|
||||||
|
=^ orx ..ya new-view:(logon:for-client our)
|
||||||
|
=+ vew=(ire-ix (oryx-to-ixor orx))
|
||||||
|
((teba new-lens.vew) (need grab-json))
|
||||||
|
::
|
||||||
++ resolve
|
++ resolve
|
||||||
|= {cug/(list @t) pez/pest} ^+ done
|
|= {cug/(list @t) pez/pest} ^+ done
|
||||||
?~ pez done
|
?~ pez done
|
||||||
@ -1268,7 +1276,7 @@
|
|||||||
::
|
::
|
||||||
$mess
|
$mess
|
||||||
:- %|
|
:- %|
|
||||||
=^ orx ..ya ?:(is-anon new-view:for-client [(need grab-oryx) ..ya])
|
=^ orx ..ya ?:(is-anon new-view:for-client [(need grab-oryx) ..ya])
|
||||||
=+ vew=(ire-ix (oryx-to-ixor orx))
|
=+ vew=(ire-ix (oryx-to-ixor orx))
|
||||||
((teba new-mess.vew) p.hem r.hem q.hem %json !>(`json`s.hem))
|
((teba new-mess.vew) p.hem r.hem q.hem %json !>(`json`s.hem))
|
||||||
::
|
::
|
||||||
@ -1518,7 +1526,7 @@
|
|||||||
++ give-json (teba ^give-json)
|
++ give-json (teba ^give-json)
|
||||||
++ pass-note (teba ^pass-note)
|
++ pass-note (teba ^pass-note)
|
||||||
++ hurl-note
|
++ hurl-note
|
||||||
|= {a/{dock path} b/note} ^+ ..ix
|
|= {a/{dock ?($mess $lens) path} b/note} ^+ ..ix
|
||||||
=: med (~(put to med) hen)
|
=: med (~(put to med) hen)
|
||||||
hen `~
|
hen `~
|
||||||
==
|
==
|
||||||
@ -1538,40 +1546,73 @@
|
|||||||
|= a/even ^+ eve
|
|= a/even ^+ eve
|
||||||
[+(p.eve) (~(put by q.eve) p.eve a)]
|
[+(p.eve) (~(put by q.eve) p.eve a)]
|
||||||
::
|
::
|
||||||
|
++ new-lens
|
||||||
|
|= jon/json ^+ ..ix
|
||||||
|
=. +>.$
|
||||||
|
%+ pass-note
|
||||||
|
[%of ire (gsig [our %dojo] lens+/)]
|
||||||
|
[%g %deal [him our] %dojo %peel %lens-json /sole]
|
||||||
|
=. +>.$
|
||||||
|
%+ pass-note
|
||||||
|
[%of ire (gsig [our %dojo] lens+/)]
|
||||||
|
[%g %deal [him our] %dojo %punk %lens-command %json !>(`json`jon)]
|
||||||
|
abet
|
||||||
|
::
|
||||||
++ new-mess
|
++ new-mess
|
||||||
|= {a/dock b/wire c/mark d/cage} ^+ ..ix
|
|= {a/dock b/wire c/mark d/cage} ^+ ..ix
|
||||||
(hurl-note [a b] [%g %deal [him -.a] +.a %punk c d])
|
(hurl-note [a mess+b] [%g %deal [him -.a] +.a %punk c d])
|
||||||
::
|
::
|
||||||
++ add-subs
|
++ add-subs
|
||||||
|= {a/dock $json b/wire c/path} ^+ ..ix
|
|= {a/dock $json b/wire c/path} ^+ ..ix
|
||||||
?: (~(has in sus) +<) ~|(duplicate+c !!)
|
?: (~(has in sus) +<) ~|(duplicate+c !!)
|
||||||
=. sus (~(put in sus) +<)
|
=. sus (~(put in sus) +<)
|
||||||
(hurl-note [a b] [%g %deal [him -.a] +.a %peel %json c])
|
(hurl-note [a mess+b] [%g %deal [him -.a] +.a %peel %json c])
|
||||||
::
|
::
|
||||||
++ pul-subs
|
++ pul-subs
|
||||||
|= {a/dock $json b/wire c/path} ^+ ..ix
|
|= {a/dock $json b/wire c/path} ^+ ..ix
|
||||||
=. sus (~(del in sus) +<)
|
=. sus (~(del in sus) +<)
|
||||||
(hurl-note [a b] [%g %deal [him -.a] +.a %pull ~])
|
(hurl-note [a mess+b] [%g %deal [him -.a] +.a %pull ~])
|
||||||
::
|
::
|
||||||
++ del-subs :: XX per path?
|
++ del-subs :: XX per path?
|
||||||
|= {a/dock $json b/wire c/path} ^+ ..ix
|
|= {a/dock $json b/wire c/path} ^+ ..ix
|
||||||
=. ..ix (pul-subs +<)
|
=. ..ix (pul-subs +<)
|
||||||
(nice-json:pop-duct:(ire-ix ire)) :: XX gall ack
|
(nice-json:pop-duct:(ire-ix ire)) :: XX gall ack
|
||||||
::
|
::
|
||||||
|
++ get-lens
|
||||||
|
|= {a/whir-of fec/json} ^+ ..ix
|
||||||
|
?~ fec ..ix :: nulled event we don't care about
|
||||||
|
=. +>.$
|
||||||
|
%+ pass-note
|
||||||
|
`whir`[%of ire (gsig [our %dojo] lens+/)]
|
||||||
|
`note`[%g %deal [him our] %dojo %pull ~]
|
||||||
|
abet:(give-json 200 ~ fec)
|
||||||
|
::
|
||||||
++ get-rush
|
++ get-rush
|
||||||
|= {a/whir-of b/json} ^+ ..ix
|
|= {a/whir-of b/json} ^+ ..ix
|
||||||
(get-even [%rush [[(slav %p p.a) q.a] r.a] (joba %json b)])
|
?: ?=($lens r.a)
|
||||||
|
(get-lens a b)
|
||||||
|
(get-even [%rush [[(slav %p p.a) q.a] s.a] (joba %json b)])
|
||||||
::
|
::
|
||||||
++ get-quit
|
++ get-quit
|
||||||
|= a/whir-of ^+ ..ix
|
|= a/whir-of ^+ ..ix
|
||||||
(get-even [%quit [[(slav %p p.a) q.a] r.a]])
|
(get-even [%quit [[(slav %p p.a) q.a] s.a]])
|
||||||
::
|
::
|
||||||
++ get-ack
|
++ get-ack
|
||||||
|= {a/whir-of b/(unit {term tang})} ^+ ..ix
|
|= {a/whir-of b/(unit {term tang})} ^+ ..ix
|
||||||
|
?: ?=($lens r.a)
|
||||||
|
(ack-lens b)
|
||||||
?: =(~ med) ~& resp-lost+ire ..ix
|
?: =(~ med) ~& resp-lost+ire ..ix
|
||||||
?~ b (nice-json:pop-duct)
|
?~ b (nice-json:pop-duct)
|
||||||
(mean-json:pop-duct 500 b)
|
(mean-json:pop-duct 500 b)
|
||||||
::
|
::
|
||||||
|
++ ack-lens
|
||||||
|
|= a/(unit (pair term tang)) ^+ ..ix
|
||||||
|
?~ a
|
||||||
|
..ix :: (give-json 200 ~ (joba %okey-dokey %b &))
|
||||||
|
=+ tag=(flop `tang`[>[%eyre-lens-fail p.u.a]< q.u.a])
|
||||||
|
%- (slog tag)
|
||||||
|
abet:(give-json 500 ~ (jape (wush 160 tag)))
|
||||||
|
::
|
||||||
++ get-even
|
++ get-even
|
||||||
|= ven/even ^+ ..ix
|
|= ven/even ^+ ..ix
|
||||||
=+ num=p.eve
|
=+ num=p.eve
|
||||||
@ -1584,7 +1625,7 @@
|
|||||||
++ give-even
|
++ give-even
|
||||||
|= {pol/? num/@u ven/even} ^+ done
|
|= {pol/? num/@u ven/even} ^+ done
|
||||||
=: q.eve (~(del by q.eve) (dec num)) :: TODO ponder a-2
|
=: q.eve (~(del by q.eve) (dec num)) :: TODO ponder a-2
|
||||||
mow ?.(?=($rush -.ven) mow mow:(pass-took p.ven))
|
mow ?.(?=($rush -.ven) mow mow:(pass-took [- %mess +]:p.ven))
|
||||||
==
|
==
|
||||||
?> pol :: XX eventstream
|
?> pol :: XX eventstream
|
||||||
%^ give-json 200 ~
|
%^ give-json 200 ~
|
||||||
@ -1601,7 +1642,7 @@
|
|||||||
(pass-note of+/[ire] [%b %rest era])
|
(pass-note of+/[ire] [%b %rest era])
|
||||||
::
|
::
|
||||||
++ pass-took
|
++ pass-took
|
||||||
|= a/{p/dock wire}
|
|= a/{p/dock ?($mess $lens) wire}
|
||||||
%+ pass-note(hen `~)
|
%+ pass-note(hen `~)
|
||||||
[%of ire (gsig a)]
|
[%of ire (gsig a)]
|
||||||
[%g %deal [him -.p.a] +.p.a %pump ~]
|
[%g %deal [him -.p.a] +.p.a %pump ~]
|
||||||
@ -1879,8 +1920,12 @@
|
|||||||
~
|
~
|
||||||
::
|
::
|
||||||
++ load :: take previous state
|
++ load :: take previous state
|
||||||
|= old/bolo
|
=+ bolo-4={$4 _%*(+ *bolo lyv *(map duct ^))}
|
||||||
..^$(+>- old)
|
|= old/?(bolo bolo-4)
|
||||||
|
?- -.old
|
||||||
|
$5 ..^$(+>- old)
|
||||||
|
$4 $(old [%5 +.old(lyv ~)]) :: minor leak
|
||||||
|
==
|
||||||
::
|
::
|
||||||
++ scry
|
++ scry
|
||||||
|= {fur/(unit (set monk)) ren/@tas who/ship syd/desk lot/coin tyl/path}
|
|= {fur/(unit (set monk)) ren/@tas who/ship syd/desk lot/coin tyl/path}
|
||||||
@ -1925,4 +1970,3 @@
|
|||||||
q.hin
|
q.hin
|
||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
!: :: %gall, agent execution
|
!: :: %gall, agent execution
|
||||||
|
|
||||||
!? 163
|
!? 163
|
||||||
::::
|
::::
|
||||||
|= pit/vase
|
|= pit/vase
|
||||||
@ -786,6 +787,7 @@
|
|||||||
(ap-move-pass -.q.vax +<.q.vax cav)
|
(ap-move-pass -.q.vax +<.q.vax cav)
|
||||||
$diff (ap-move-diff -.q.vax cav)
|
$diff (ap-move-diff -.q.vax cav)
|
||||||
$hiss (ap-move-hiss -.q.vax cav)
|
$hiss (ap-move-hiss -.q.vax cav)
|
||||||
|
$peel (ap-move-peel -.q.vax cav)
|
||||||
$peer (ap-move-peer -.q.vax cav)
|
$peer (ap-move-peer -.q.vax cav)
|
||||||
$pull (ap-move-pull -.q.vax cav)
|
$pull (ap-move-pull -.q.vax cav)
|
||||||
$poke (ap-move-poke -.q.vax cav)
|
$poke (ap-move-poke -.q.vax cav)
|
||||||
@ -875,6 +877,22 @@
|
|||||||
:- p.p.yep
|
:- p.p.yep
|
||||||
[%send q.p.yep r.p.yep %poke p.q.gaw paw]
|
[%send q.p.yep r.p.yep %poke p.q.gaw paw]
|
||||||
::
|
::
|
||||||
|
++ ap-move-peel :: pass %peel
|
||||||
|
|= {sto/bone vax/vase}
|
||||||
|
^- {(each cove tang) _+>}
|
||||||
|
=^ yep +>.$ (ap-move-mess vax)
|
||||||
|
:_ +>.$
|
||||||
|
?: ?=($| -.yep) yep
|
||||||
|
=+ mar=((soft mark) +>-.q.vax)
|
||||||
|
?~ mar
|
||||||
|
[%| (ap-suck "peel: malformed mark")]
|
||||||
|
=+ pux=((soft path) +>+.q.vax)
|
||||||
|
?. &(?=(^ pux) (levy u.pux (sane %ta)))
|
||||||
|
[%| (ap-suck "peel: malformed path")]
|
||||||
|
:^ %& sto %pass
|
||||||
|
:- p.p.yep
|
||||||
|
[%send q.p.yep r.p.yep %peel u.mar u.pux]
|
||||||
|
::
|
||||||
++ ap-move-peer :: pass %peer
|
++ ap-move-peer :: pass %peer
|
||||||
|= {sto/bone vax/vase}
|
|= {sto/bone vax/vase}
|
||||||
^- {(each cove tang) _+>}
|
^- {(each cove tang) _+>}
|
||||||
|
@ -2181,7 +2181,7 @@
|
|||||||
{{$hat $~} p/hole q/hart} :: login redirect
|
{{$hat $~} p/hole q/hart} :: login redirect
|
||||||
{{$get $~} p/@uvH q/{? clip httq}} :: remote request
|
{{$get $~} p/@uvH q/{? clip httq}} :: remote request
|
||||||
{{$got $~} p/@uvH q/httr} :: remote response
|
{{$got $~} p/@uvH q/httr} :: remote response
|
||||||
{{$gib $~} p/@uvH} :: remote cancel
|
{{$gib $~} p/@uvH} :: remote cancel
|
||||||
== ::
|
== ::
|
||||||
:::: ::
|
:::: ::
|
||||||
++ kiss-eyre :: in request ->$
|
++ kiss-eyre :: in request ->$
|
||||||
@ -2192,6 +2192,7 @@
|
|||||||
{$serv p/$@(desk beam)} :: set serving root
|
{$serv p/$@(desk beam)} :: set serving root
|
||||||
{$them p/(unit hiss)} :: outbound request
|
{$them p/(unit hiss)} :: outbound request
|
||||||
{$they p/@ud q/httr} :: inbound response
|
{$they p/@ud q/httr} :: inbound response
|
||||||
|
{$chis p/? q/clip r/httq} :: IPC inbound request
|
||||||
{$this p/? q/clip r/httq} :: inbound request
|
{$this p/? q/clip r/httq} :: inbound request
|
||||||
{$thud $~} :: inbound cancel
|
{$thud $~} :: inbound cancel
|
||||||
{$wegh $~} :: report memory
|
{$wegh $~} :: report memory
|
||||||
|
6
gen/pipe/cancel.hoon
Normal file
6
gen/pipe/cancel.hoon
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
!:
|
||||||
|
:- %say
|
||||||
|
|= $: {now/@da eny/@uvI bec/beak}
|
||||||
|
{{app/term source/path station/knot $~} $~}
|
||||||
|
==
|
||||||
|
[%pipe-cancel app source station]
|
6
gen/pipe/connect.hoon
Normal file
6
gen/pipe/connect.hoon
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
!:
|
||||||
|
:- %say
|
||||||
|
|= $: {now/@da eny/@uvI bec/beak}
|
||||||
|
{{app/term source/path station/knot $~} $~}
|
||||||
|
==
|
||||||
|
[%pipe-connect app source station]
|
6
gen/pipe/list.hoon
Normal file
6
gen/pipe/list.hoon
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
!:
|
||||||
|
:- %say
|
||||||
|
|= $: {now/@da eny/@uvI bec/beak}
|
||||||
|
{$~ $~}
|
||||||
|
==
|
||||||
|
[%pipe-list ~]
|
@ -1,7 +1,32 @@
|
|||||||
:: Converts the result of an 'issues' event into a issues:gh.
|
:: Converts the result of an 'issues' event into a issues:gh.
|
||||||
/- gh
|
/- gh
|
||||||
/+ gh-parse
|
/+ gh-parse, talk
|
||||||
|_ issue-comment/issue-comment:gh
|
|_ issue-comment/issue-comment:gh
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ talk-speeches
|
||||||
|
^- (list speech:talk)
|
||||||
|
:_ ~
|
||||||
|
=+ ^= txt
|
||||||
|
;: (cury cat 3)
|
||||||
|
'on issue #'
|
||||||
|
`@t`(rsh 3 2 (scot %ui number.issue.issue-comment))
|
||||||
|
': '
|
||||||
|
body.comment.issue-comment
|
||||||
|
==
|
||||||
|
:* %api %github
|
||||||
|
login.sender.issue-comment
|
||||||
|
(need (epur url.sender.issue-comment))
|
||||||
|
txt
|
||||||
|
txt
|
||||||
|
(need (epur url.comment.issue-comment))
|
||||||
|
%- jobe :~
|
||||||
|
repository+s+name.repository.issue-comment
|
||||||
|
number+(jone number.issue.issue-comment)
|
||||||
|
title+s+title.issue.issue-comment
|
||||||
|
==
|
||||||
|
==
|
||||||
|
--
|
||||||
++ grab
|
++ grab
|
||||||
|%
|
|%
|
||||||
++ json
|
++ json
|
||||||
|
@ -1,7 +1,119 @@
|
|||||||
:: Converts the result of an 'issues' event into a issues:gh.
|
:: Converts the result of an 'issues' event into a issues:gh.
|
||||||
/- gh
|
/- gh
|
||||||
/+ gh-parse
|
/+ gh-parse, talk
|
||||||
|_ issues/issues:gh
|
|_ issues/issues:gh
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ talk-speeches
|
||||||
|
^- (list speech:talk)
|
||||||
|
:_ ~
|
||||||
|
=+ ^= txt
|
||||||
|
?- -.action.issues
|
||||||
|
$assigned
|
||||||
|
;: (cury cat 3)
|
||||||
|
'assigned issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
' to '
|
||||||
|
login.assignee.action.issues
|
||||||
|
' ('
|
||||||
|
title.issue.issues
|
||||||
|
')'
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$unassigned
|
||||||
|
;: (cury cat 3)
|
||||||
|
'unassigned issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
' from '
|
||||||
|
login.assignee.action.issues
|
||||||
|
' ('
|
||||||
|
title.issue.issues
|
||||||
|
')'
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$labeled
|
||||||
|
;: (cury cat 3)
|
||||||
|
'labeled issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
' as '
|
||||||
|
name.label.action.issues
|
||||||
|
' ('
|
||||||
|
title.issue.issues
|
||||||
|
')'
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$unlabeled
|
||||||
|
;: (cury cat 3)
|
||||||
|
'unlabeled issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
' as '
|
||||||
|
name.label.action.issues
|
||||||
|
' ('
|
||||||
|
title.issue.issues
|
||||||
|
')'
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$opened
|
||||||
|
;: (cury cat 3)
|
||||||
|
'opened issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
': '
|
||||||
|
title.issue.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$closed
|
||||||
|
;: (cury cat 3)
|
||||||
|
'closed issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
': '
|
||||||
|
title.issue.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$reopened
|
||||||
|
;: (cury cat 3)
|
||||||
|
'reopened issue #'
|
||||||
|
(rsh 3 2 (scot %ui number.issue.issues))
|
||||||
|
': '
|
||||||
|
title.issue.issues
|
||||||
|
==
|
||||||
|
==
|
||||||
|
:* %api %github
|
||||||
|
login.sender.issues
|
||||||
|
(need (epur url.sender.issues))
|
||||||
|
txt txt
|
||||||
|
(need (epur url.issue.issues))
|
||||||
|
%- jobe
|
||||||
|
%+ welp
|
||||||
|
:~ repository+s+name.repository.issues
|
||||||
|
number+(jone number.issue.issues)
|
||||||
|
title+s+title.issue.issues
|
||||||
|
action+s+-.action.issues
|
||||||
|
==
|
||||||
|
?- -.action.issues
|
||||||
|
$assigned
|
||||||
|
:~ assignee+s+login.assignee.action.issues
|
||||||
|
assignee-url+s+url.assignee.action.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$unassigned
|
||||||
|
:~ assignee+s+login.assignee.action.issues
|
||||||
|
assignee-url+s+url.assignee.action.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$labeled
|
||||||
|
:~ label+s+name.label.action.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$unlabeled
|
||||||
|
:~ label+s+name.label.action.issues
|
||||||
|
==
|
||||||
|
::
|
||||||
|
$opened ~
|
||||||
|
$closed ~
|
||||||
|
$reopened ~
|
||||||
|
==
|
||||||
|
==
|
||||||
|
--
|
||||||
++ grab
|
++ grab
|
||||||
|%
|
|%
|
||||||
++ json
|
++ json
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|_ {method/meth endpoint/path jon/json}
|
|_ {method/meth endpoint/(list @t) jon/json}
|
||||||
++ grab
|
++ grab
|
||||||
|%
|
|%
|
||||||
++ noun {method/meth endpoint/path jon/json}
|
++ noun {method/meth endpoint/(list @t) jon/json}
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
60
mar/lens/command.hoon
Normal file
60
mar/lens/command.hoon
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/- lens
|
||||||
|
!:
|
||||||
|
|_ com/command:lens
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun command:lens
|
||||||
|
++ json
|
||||||
|
|= jon/^json
|
||||||
|
^- command:lens
|
||||||
|
%- need
|
||||||
|
%. jon
|
||||||
|
=> [. jo]
|
||||||
|
=< %- ot :~
|
||||||
|
source+source
|
||||||
|
sink+sink
|
||||||
|
==
|
||||||
|
|%
|
||||||
|
++ source
|
||||||
|
^- $-(^json (unit source:lens))
|
||||||
|
|= jon/^json
|
||||||
|
=+ tuple=%.(jon (ar source))
|
||||||
|
?^ tuple
|
||||||
|
`[%tuple u.tuple]
|
||||||
|
%. jon
|
||||||
|
%- of :~
|
||||||
|
data+so:jo
|
||||||
|
dojo+so:jo
|
||||||
|
clay+so:jo
|
||||||
|
url+(su auri:urlp)
|
||||||
|
api+(su ;~(plug sym ;~(pfix col prn)))
|
||||||
|
:- %get-api
|
||||||
|
%- su
|
||||||
|
;~ plug
|
||||||
|
sym
|
||||||
|
;~(pfix col (more fas (cook crip (star ;~(less fas prn)))))
|
||||||
|
==
|
||||||
|
listen-api+(su ;~(plug sym ;~(pfix col sym)))
|
||||||
|
as+(ot mark+(su sym) next+source ~)
|
||||||
|
hoon+(ot code+so:jo next+source ~)
|
||||||
|
==
|
||||||
|
++ sink
|
||||||
|
^- $-(^json (unit sink:lens))
|
||||||
|
%- of :~
|
||||||
|
stdout+|=(^json (some ~))
|
||||||
|
output-file+so:jo
|
||||||
|
output-clay+(su (easy /sentinel/path))
|
||||||
|
url+(su auri:urlp)
|
||||||
|
to-api+(su ;~(plug sym ;~(pfix col prn)))
|
||||||
|
:- %send-api
|
||||||
|
%- su
|
||||||
|
;~ plug
|
||||||
|
sym
|
||||||
|
;~(pfix col (more fas (cook crip (star ;~(less fas prn)))))
|
||||||
|
==
|
||||||
|
command+so:jo
|
||||||
|
app+(su sym)
|
||||||
|
==
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
12
mar/lens/json.hoon
Normal file
12
mar/lens/json.hoon
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/json/lens/mar
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
!:
|
||||||
|
:::: ~fyr
|
||||||
|
::
|
||||||
|
|_ jon/json
|
||||||
|
++ grab |% ++ noun json
|
||||||
|
--
|
||||||
|
++ grow |% ++ json jon
|
||||||
|
-- --
|
@ -41,6 +41,22 @@
|
|||||||
--
|
--
|
||||||
++ grow
|
++ grow
|
||||||
|%
|
|%
|
||||||
|
++ lens-json :: json for cli client
|
||||||
|
^- ?($~ ^json) :: null = ignore
|
||||||
|
?+ -.sef ~
|
||||||
|
$tan s+(role (turn (flop p.sef) |=(a/tank (crip ~(ram re a)))))
|
||||||
|
$txt s+(crip p.sef)
|
||||||
|
$sav
|
||||||
|
(jobe file+s+(crip <`path`p.sef>) data+s+(crip (sifo q.sef)) ~)
|
||||||
|
::
|
||||||
|
$mor
|
||||||
|
=+ all=(turn p.sef |=(a/sole-effect lens-json(sef a)))
|
||||||
|
=. all (skip all |=(a/^json ?=($~ a)))
|
||||||
|
?~ all ~
|
||||||
|
?~ t.all i.all
|
||||||
|
~|(multiple-effects+`(list ^json)`all !!)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ json
|
++ json
|
||||||
^- ^json
|
^- ^json
|
||||||
?+ -.sef
|
?+ -.sef
|
||||||
|
@ -91,6 +91,17 @@
|
|||||||
$app (jobe txt+[%s q.a] src+[%s p.a] ~)
|
$app (jobe txt+[%s q.a] src+[%s p.a] ~)
|
||||||
$fat (jobe tor+(tors p.a) taf+$(a q.a) ~)
|
$fat (jobe tor+(tors p.a) taf+$(a q.a) ~)
|
||||||
$mor a+(turn p.a spec)
|
$mor a+(turn p.a spec)
|
||||||
|
$api
|
||||||
|
%- jobe :~
|
||||||
|
service+s+service.a
|
||||||
|
id+s+id.a
|
||||||
|
~& url=`*`id-url.a
|
||||||
|
id-url+s+(crip (earn id-url.a))
|
||||||
|
summary+s+summary.a
|
||||||
|
body+s+body.a
|
||||||
|
url+s+(crip (earn url.a))
|
||||||
|
meta+meta.a
|
||||||
|
==
|
||||||
:: %inv (jobe ship+(jope p.a) party+[%s q.a] ~)
|
:: %inv (jobe ship+(jope p.a) party+[%s q.a] ~)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
23
mar/talk/speeches.hoon
Normal file
23
mar/talk/speeches.hoon
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/speeches/talk/mar
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
/- talk
|
||||||
|
/+ talk,map-to-json
|
||||||
|
!:
|
||||||
|
=+ talk
|
||||||
|
|_ gam/(list speech)
|
||||||
|
::
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun (list speech)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ grad
|
||||||
|
|%
|
||||||
|
++ form %talk-speeches
|
||||||
|
++ diff |=((list speech) +<)
|
||||||
|
++ pact |=((list speech) +<)
|
||||||
|
++ join |=({(list speech) (list speech)} `(unit mime)`~)
|
||||||
|
--
|
||||||
|
--
|
28
sur/lens.hoon
Normal file
28
sur/lens.hoon
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|%
|
||||||
|
++ command
|
||||||
|
$: source/source
|
||||||
|
sink/sink
|
||||||
|
==
|
||||||
|
++ source
|
||||||
|
$% {$data data/@}
|
||||||
|
{$dojo command/@t}
|
||||||
|
{$clay pax/@t}
|
||||||
|
{$url url/purl}
|
||||||
|
{$api api/term command/@t}
|
||||||
|
{$get-api api/term endpoint/(list @t)}
|
||||||
|
{$as mar/mark next/source} :: can't be at the
|
||||||
|
{$hoon code/@t next/source} :: end since they
|
||||||
|
{$tuple next/(list source)} :: don't bunt well
|
||||||
|
{$listen-api api/term event/term}
|
||||||
|
==
|
||||||
|
++ sink
|
||||||
|
$% {$stdout $~}
|
||||||
|
{$output-file pax/@t}
|
||||||
|
{$output-clay pax/path}
|
||||||
|
{$url url/purl}
|
||||||
|
{$to-api api/term command/@t}
|
||||||
|
{$send-api api/term endpoint/(list @t)}
|
||||||
|
{$command command/@t}
|
||||||
|
{$app app/term}
|
||||||
|
==
|
||||||
|
--
|
@ -65,6 +65,15 @@
|
|||||||
{$lin p/? q/@t} :: no/@ text line
|
{$lin p/? q/@t} :: no/@ text line
|
||||||
{$mor p/(list speech)} :: multiplex
|
{$mor p/(list speech)} :: multiplex
|
||||||
{$app p/@tas q/@t} :: app message
|
{$app p/@tas q/@t} :: app message
|
||||||
|
$: $api :: api message
|
||||||
|
service/@tas :: service name
|
||||||
|
id/@t :: id on the service
|
||||||
|
id-url/purl :: link to id
|
||||||
|
summary/@t :: summary of event
|
||||||
|
body/@t :: body of event
|
||||||
|
url/purl :: link to event
|
||||||
|
meta/json :: other data for web
|
||||||
|
== ::
|
||||||
== ::
|
== ::
|
||||||
++ serial @uvH :: unique identity
|
++ serial @uvH :: unique identity
|
||||||
++ partner (each station passport) :: interlocutor
|
++ partner (each station passport) :: interlocutor
|
||||||
|
Loading…
Reference in New Issue
Block a user