Merge pull request #6237 from urbit/i/6236/clay-cult-inspection

clay: allow scrying out of pending requests
This commit is contained in:
Ted Blackman 2023-02-08 08:58:31 -06:00 committed by GitHub
commit 5137db7096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,28 @@
:: +desk-requests: count pending requests for a desk
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[=desk ~]
~
==
:- %tang
^- tang
=/ cul=(list [@p rave:clay])
%~ tap in
.^ (set [@p rave:clay])
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
==
::
=/ [loc=_cul inc=_cul]
(skid cul |=([=@p rave:clay] =(p p.bec)))
=/ syc=_cul
=/ nex=@ud
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
::
%- flop
:~ leaf+"total: {<(lent cul)>}"
leaf+"- local: {<(lent loc)>}"
leaf+"- incoming: {<(lent inc)>}"
leaf+" - for next: {<(lent syc)>}"
==

View File

@ -5630,6 +5630,7 @@
%sweep ``[%sweep !>(sweep)]
%rang ``[%rang !>(ran.ruf)]
%tomb ``[%flag !>((tomb t.path))]
%cult ``[%cult !>((cult t.path))]
%flow ``[%flow !>(fad.ruf)]
%domes domes
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
@ -5656,6 +5657,22 @@
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
``[%domes !>(`cone`domes)]
::
++ cult
|= =path
^- (set [@p rave])
%- %~ run in
%~ key by
?~ path *^cult
qyx:(~(gut by dos.rom.ruf) i.path *dojo)
|= wove
:- ship:(fall for [ship=our @ud])
?- -.rove
%sing rove
%next [%next mood.rove]
%mult [%mult mool.rove]
%many [%many [track moat]:rove]
==
::
:: True if file is accessible
::
++ tomb