Merge branch 'gall-hack-new-deal'

This commit is contained in:
Isaac Visintainer 2020-04-09 15:39:49 -07:00
commit 1fdf8a9789

View File

@ -773,6 +773,60 @@
++ mo-apply
|= [agent=term =routes =deal]
^+ mo-core
:: TODO: Remove this horrific hack when ford pinto comes!
=> |%
+$ serial @uvH
::
+$ letter
$% [%text text=cord]
[%url url=cord]
[%code expression=cord output=(list tank)]
[%me narrative=cord]
==
::
+$ envelope
$: uid=serial
number=@
author=ship
when=time
=letter
==
::
+$ config
$: length=@
read=@
==
::
+$ mailbox
$: =config
envelopes=(list envelope)
==
::
+$ inbox (map path mailbox)
::
+$ chat-configs (map path config)
::
+$ chat-base
$% [%create =path]
[%delete =path]
[%message =path =envelope]
[%read =path]
==
::
+$ chat-action
$% :: %messages: append a list of messages to mailbox
::
[%messages =path envelopes=(list envelope)]
chat-base
==
::
+$ chat-update
$% [%keys keys=(set path)]
[%config =path =config]
[%messages =path start=@ud end=@ud envelopes=(list envelope)]
chat-base
==
--
::
=/ =path
=/ ship (scot %p attributing.routes)
@ -783,9 +837,23 @@
[p q]:beak
::
?: ?=(%raw-poke -.deal)
=/ =schematic:ford [%vale ship-desk +.deal]
=/ =note-arvo [%f %build live=%.n schematic]
(mo-pass path note-arvo)
:: TODO: Remove this horrific hack when ford pinto comes!
?+ mark.deal
=/ =schematic:ford [%vale ship-desk +.deal]
=/ =note-arvo [%f %build live=%.n schematic]
(mo-pass path note-arvo)
::
%chat-action
=/ chat-act=(unit chat-action) ((soft chat-action) noun.deal)
?~ chat-act
~& gall-raw-chat-poke-failed+[agent attributing.routes]
mo-core
=/ =cage [%chat-action !>(u.chat-act)]
=/ new-deal=^deal [%poke cage]
=/ app (ap-abed:ap agent routes)
=. app (ap-apply:app new-deal)
ap-abet:app
==
::
?: ?=(%poke-as -.deal)
=/ =schematic:ford [%cast ship-desk mark.deal [%$ cage.deal]]
@ -845,7 +913,6 @@
++ mo-handle-ames-response
|= =ames-response
^+ mo-core
::
?- -.ames-response
:: %d: diff; ask ford to validate .noun as .mark
::
@ -856,7 +923,6 @@
=/ =note-arvo
=/ =disc:ford [our %home]
[%f %build live=%.n %vale disc [mark noun]:ames-response]
::
(mo-pass wire note-arvo)
::
:: %x: kick; tell agent the publisher canceled the subscription