2019-02-06 02:52:50 +03:00
|
|
|
!: :: %gall, agent execution
|
2016-11-24 07:25:07 +03:00
|
|
|
!? 163
|
2019-02-09 00:16:42 +03:00
|
|
|
!:
|
2016-11-24 07:25:07 +03:00
|
|
|
::::
|
2019-04-11 23:06:05 +03:00
|
|
|
|= pit=vase
|
2016-12-07 06:13:33 +03:00
|
|
|
=, gall
|
2015-05-10 01:55:05 +03:00
|
|
|
=> =~
|
2019-05-05 03:23:22 +03:00
|
|
|
|%
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +coke: cook
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
++ coke
|
|
|
|
$? %inn
|
|
|
|
%out
|
|
|
|
%cay
|
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +ames-response: network response message (%boon)
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
:: %d: diff
|
|
|
|
:: %x: quit
|
|
|
|
::
|
|
|
|
++ ames-response
|
|
|
|
$% [%d =mark noun=*]
|
2019-08-15 20:51:50 +03:00
|
|
|
[%x ~]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +ames-request: network request (%plea)
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
:: %m: poke
|
|
|
|
:: %l: "peel" mark-translated subscribe
|
|
|
|
:: %s: subscribe
|
|
|
|
:: %u: unsubscribe
|
|
|
|
::
|
|
|
|
++ ames-request
|
|
|
|
$% [%m =mark noun=*]
|
2019-08-15 20:51:50 +03:00
|
|
|
[%l =mark =path]
|
|
|
|
[%s =path]
|
|
|
|
[%u ~]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +remote-request: kinds of $agent-action that can cross the network
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
:: Used in wires to identify the kind of remote request we made.
|
|
|
|
:: Bijective with the tags of $ames-request.
|
|
|
|
::
|
|
|
|
++ remote-request
|
2019-05-05 03:23:22 +03:00
|
|
|
$? %peer
|
|
|
|
%peel
|
|
|
|
%poke
|
|
|
|
%pull
|
|
|
|
==
|
|
|
|
--
|
|
|
|
|%
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +internal-note: +ap note
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ internal-note
|
2019-08-15 20:51:50 +03:00
|
|
|
$% [%meta =term =vase]
|
|
|
|
[%send =ship =internal-task]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +internal-move: agent-level move
|
2019-06-27 07:08:07 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: Analogous to an Arvo move, except these are routed by bone, instead of
|
|
|
|
:: duct.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ internal-move
|
2019-08-14 14:57:51 +03:00
|
|
|
$: =bone
|
|
|
|
move=(wind internal-note internal-gift)
|
2019-05-06 05:17:46 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +move: Arvo-level move
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-08-15 23:12:53 +03:00
|
|
|
++ move
|
|
|
|
$: =duct
|
|
|
|
move=(wind note-arvo gift-arvo)
|
|
|
|
==
|
2019-05-05 03:23:22 +03:00
|
|
|
--
|
|
|
|
|%
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +state-old: upgrade path
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
++ state-old ?(state)
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +state: all state
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
++ state
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: state version
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
%0
|
2019-06-02 09:57:06 +03:00
|
|
|
:: agents by ship
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=agents
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +subscribers: subscriber data
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-30 05:24:24 +03:00
|
|
|
++ subscribers
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: incoming subscribers
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
incoming=bitt
|
2019-05-05 03:23:22 +03:00
|
|
|
:: outgoing subscribers
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
outgoing=boat
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +agents: ship state
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
++ agents
|
2019-08-15 23:53:23 +03:00
|
|
|
$: :: system duct
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
system-duct=duct
|
2019-05-05 03:23:22 +03:00
|
|
|
:: foreign contacts
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
contacts=(set ship)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: running agents
|
|
|
|
::
|
2019-05-28 09:49:17 +03:00
|
|
|
running=(map term agent)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: waiting queue
|
|
|
|
::
|
2019-06-26 00:25:03 +03:00
|
|
|
blocked=(map term blocked)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +routes: new cuff
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ routes
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: disclosing to
|
|
|
|
::
|
|
|
|
disclosing=(unit (set ship))
|
|
|
|
:: attributed to
|
|
|
|
::
|
|
|
|
attributing=ship
|
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +ducts: opaque input
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-29 10:46:55 +03:00
|
|
|
++ ducts
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: bone sequence
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
bone=@ud
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
bone-map=(map duct bone)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by bone
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
duct-map=(map bone duct)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +misvale-data: subscribers with bad marks
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
:: XX a hack, required to break a subscription loop
|
|
|
|
:: which arises when an invalid mark crashes a diff.
|
|
|
|
:: See usage in ap-misvale.
|
|
|
|
::
|
|
|
|
++ misvale-data (set wire)
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +agent: agent state
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ agent
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: bad reqs
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
misvale=misvale-data
|
|
|
|
:: cache
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
cache=worm
|
2019-05-13 10:40:50 +03:00
|
|
|
:: ap-find-arm cache
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
arm-cache=(map [term path] (unit (pair @ud term)))
|
2019-05-05 03:23:22 +03:00
|
|
|
:: control duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
control-duct=duct
|
2019-05-05 03:23:22 +03:00
|
|
|
:: unstopped
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
live=?
|
2019-05-05 03:23:22 +03:00
|
|
|
:: statistics
|
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=stats
|
2019-05-05 03:23:22 +03:00
|
|
|
:: subscribers
|
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=subscribers
|
2019-05-05 03:23:22 +03:00
|
|
|
:: running state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
running-state=vase
|
2019-05-05 03:23:22 +03:00
|
|
|
:: update control
|
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=beak
|
2019-05-05 03:23:22 +03:00
|
|
|
:: req'd translations
|
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
marks=(map bone mark)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: opaque ducts
|
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=ducts
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +blocked: blocked tasks
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-08-15 20:40:03 +03:00
|
|
|
++ blocked (qeu (trel duct routes agent-action))
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +stats: statistics
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ stats
|
2019-08-14 14:57:51 +03:00
|
|
|
$: :: change number
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
change=@ud
|
2019-05-05 03:23:22 +03:00
|
|
|
:: entropy
|
|
|
|
::
|
|
|
|
eny=@uvJ
|
|
|
|
:: time
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
time=@da
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
--
|
2016-11-24 07:25:07 +03:00
|
|
|
. ==
|
2019-08-15 19:14:09 +03:00
|
|
|
=| =state
|
2019-08-14 14:57:51 +03:00
|
|
|
|= $: :: identity
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
our=ship
|
|
|
|
:: urban time
|
|
|
|
::
|
|
|
|
now=@da
|
|
|
|
:: entropy
|
|
|
|
::
|
|
|
|
eny=@uvJ
|
|
|
|
:: activate
|
|
|
|
::
|
|
|
|
ska=sley
|
|
|
|
==
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-top ..is ~
|
2019-04-27 09:08:29 +03:00
|
|
|
|%
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +gall-payload: gall payload
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
++ gall-payload +
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +mo: Arvo-level move handling
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: An outer core responsible for routing moves to and from Arvo; it calls
|
|
|
|
:: an inner core, +ap, to route internal moves to and from agents.
|
2019-04-28 22:23:55 +03:00
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ mo
|
2018-12-13 04:34:25 +03:00
|
|
|
~% %gall-mo +> ~
|
2019-05-05 03:23:22 +03:00
|
|
|
|_
|
2019-08-14 14:57:51 +03:00
|
|
|
$: hen=duct
|
|
|
|
moves=(list move)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
2019-08-16 02:00:27 +03:00
|
|
|
++ mo-core .
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-abed: initialise state with the provided duct.
|
2019-04-11 23:13:17 +03:00
|
|
|
::
|
|
|
|
++ mo-abed
|
2018-12-13 04:34:25 +03:00
|
|
|
|= =duct
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:16:24 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core(hen duct)
|
2019-04-11 23:16:24 +03:00
|
|
|
:: +mo-abet: resolve moves.
|
|
|
|
::
|
|
|
|
++ mo-abet
|
2019-05-03 01:53:27 +03:00
|
|
|
^- [(list move) _gall-payload]
|
2019-04-11 23:16:24 +03:00
|
|
|
::
|
2019-04-25 20:39:32 +03:00
|
|
|
=/ resolved (flop moves)
|
2019-05-03 01:53:27 +03:00
|
|
|
[resolved gall-payload]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-06-27 07:08:07 +03:00
|
|
|
:: +mo-boot: ask %ford to build us a core for the specified agent.
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
++ mo-boot
|
2019-05-28 09:49:17 +03:00
|
|
|
|= [=term =ship =desk]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
=/ =case [%da now]
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =wire
|
2019-04-28 22:23:55 +03:00
|
|
|
=/ ship (scot %p ship)
|
|
|
|
=/ case (scot case)
|
2019-05-28 09:49:17 +03:00
|
|
|
/sys/core/[term]/[ship]/[desk]/[case]
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
=/ =note-arvo
|
2019-06-12 14:25:49 +03:00
|
|
|
=/ =schematic:ford [%core [ship desk] /hoon/[term]/app]
|
2019-04-28 22:23:55 +03:00
|
|
|
[%f %build live=%.y schematic]
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-pass wire note-arvo)
|
2019-08-14 14:57:51 +03:00
|
|
|
:: +mo-pass: prepend a standard %pass to the current list of moves.
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
|
|
|
++ mo-pass
|
2019-10-30 23:12:57 +03:00
|
|
|
|= pass=(pair wire note-arvo)
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =move [hen [%pass pass]]
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core(moves [move moves])
|
2019-08-14 14:57:51 +03:00
|
|
|
:: +mo-give: prepend a standard %give to the current list of moves.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
++ mo-give
|
2019-04-25 20:39:32 +03:00
|
|
|
|= =gift:able
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =move [hen [%give gift]]
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core(moves [move moves])
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-contains-valid-bowl: check that a vase contains a valid bowl.
|
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-contains-valid-bowl
|
|
|
|
~/ %mo-contains-valid-bowl
|
2019-04-11 23:17:26 +03:00
|
|
|
|= =vase
|
2016-11-24 07:25:07 +03:00
|
|
|
^- ?
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-vase (slew 12 vase)
|
|
|
|
?~ maybe-vase
|
2019-04-11 23:17:26 +03:00
|
|
|
%.n
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =type p.u.maybe-vase
|
2019-08-15 19:22:32 +03:00
|
|
|
(~(nest ut type) %.n -:!>(*bowl))
|
2019-06-26 00:25:03 +03:00
|
|
|
:: +mo-receive-core: receives an app core built by %ford.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: Presuming we receive a good core, we first check to see if the agent
|
|
|
|
:: is already running. If so, we update its beak in %gall's state,
|
|
|
|
:: initialise an +ap core for the agent, install the core we got from
|
|
|
|
:: %ford, and then resolve any moves associated with it.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: If we're dealing with a new agent, we create one using the result we
|
|
|
|
:: got from %ford, add it to the collection of agents %gall is keeping
|
|
|
|
:: track of, and then do more or less the same procedure as we did for the
|
|
|
|
:: running agent case.
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-06-26 00:25:03 +03:00
|
|
|
++ mo-receive-core
|
|
|
|
~/ %mo-receive-core
|
2019-05-28 09:49:17 +03:00
|
|
|
|= [=term =beak =made-result:ford]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
|
|
|
?: ?=([%incomplete *] made-result)
|
2019-04-11 23:18:29 +03:00
|
|
|
(mo-give %onto %.n tang.made-result)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
|
|
|
=/ build-result build-result.made-result
|
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
2019-04-11 23:18:29 +03:00
|
|
|
(mo-give %onto %.n message.build-result)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-04-11 23:18:29 +03:00
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
|
|
|
=/ result-vase q.cage
|
2019-06-12 14:25:49 +03:00
|
|
|
=/ maybe-agent=(unit agent)
|
2019-08-15 19:14:09 +03:00
|
|
|
(~(get by running.agents.state) term)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-06-12 14:25:49 +03:00
|
|
|
?^ maybe-agent
|
|
|
|
=/ agent u.maybe-agent(beak beak)
|
2019-08-15 19:14:09 +03:00
|
|
|
=. running.agents.state
|
|
|
|
(~(put by running.agents.state) term agent)
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =routes [disclosing=~ attributing=our]
|
|
|
|
=/ app (ap-abed:ap term routes)
|
2019-06-02 09:27:59 +03:00
|
|
|
=. app (ap-reinstall:app result-vase)
|
|
|
|
ap-abet:app
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
?. (mo-contains-valid-bowl result-vase)
|
2019-05-28 09:49:17 +03:00
|
|
|
=/ err [[%leaf "{<term>}: bogus core"] ~]
|
2019-04-27 07:54:35 +03:00
|
|
|
(mo-give %onto %.n err)
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=. mo-core (mo-new-agent term beak result-vase)
|
|
|
|
=/ old mo-core
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ wag
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =routes [disclosing=~ attributing=our]
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ app (ap-abed:ap term routes)
|
2019-06-02 09:27:59 +03:00
|
|
|
(ap-prep:app ~)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ maybe-tang -.wag
|
2019-06-02 09:27:59 +03:00
|
|
|
=/ app +.wag
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
2019-08-16 02:00:27 +03:00
|
|
|
=. mo-core old
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-give %onto %.n u.maybe-tang)
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=. mo-core ap-abet:app
|
|
|
|
=. mo-core (mo-clear-queue term)
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =suss [term %boot now]
|
2019-06-02 09:27:59 +03:00
|
|
|
(mo-give %onto [%.y suss])
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-new-agent: create a new agent and add it to %gall's state.
|
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: %gall maintains a collection of running agents. This arm creates a
|
|
|
|
:: new one with the provided name, beak, and state (held in a vase).
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-new-agent
|
2019-05-28 09:49:17 +03:00
|
|
|
|= [=term =beak =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =ducts
|
2019-05-06 05:17:46 +03:00
|
|
|
:+ bone=1
|
|
|
|
bone-map=[[[~ ~] 0] ~ ~]
|
|
|
|
duct-map=[[0 [~ ~]] ~ ~]
|
|
|
|
::
|
|
|
|
=/ agent
|
|
|
|
=/ default-agent *agent
|
|
|
|
%_ default-agent
|
|
|
|
control-duct hen
|
|
|
|
beak beak
|
|
|
|
running-state vase
|
2019-05-29 10:46:55 +03:00
|
|
|
ducts ducts
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ mo-core
|
2019-08-15 19:14:09 +03:00
|
|
|
running.agents.state (~(put by running.agents.state) term agent)
|
2019-06-12 14:25:49 +03:00
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +mo-send-foreign-request: handle local app request to .ship
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
++ mo-send-foreign-request
|
|
|
|
~/ %mo-send-foreign-request
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =internal-task]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ foreign-agent p.internal-task
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent-action q.internal-task
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%peer-not -.agent-action)
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-give %unto %reap `p.agent-action)
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=. mo-core (mo-track-rift ship)
|
|
|
|
=/ =ames-request
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.agent-action
|
|
|
|
%poke [%m p.p.agent-action q.q.p.agent-action]
|
2019-04-11 23:22:58 +03:00
|
|
|
%pull [%u ~]
|
|
|
|
%puff !!
|
|
|
|
%punk !!
|
2019-05-06 05:17:46 +03:00
|
|
|
%peel [%l agent-action]
|
|
|
|
%peer [%s p.agent-action]
|
2019-04-11 23:22:58 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ sys-path
|
|
|
|
=/ action -.agent-action
|
|
|
|
/sys/way/[action]
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =path /ge/[term]
|
|
|
|
[%a %plea ship %g path ames-request]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
(mo-pass sys-path note-arvo)
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +mo-track-rift: ensure we're subscribed to jael for .ship breaches
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
++ mo-track-rift
|
|
|
|
|= =ship
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
:: if already contacted, no-op
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?: (~(has in contacts.agents.state) ship)
|
2019-09-25 00:53:31 +03:00
|
|
|
mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
:: first contact; update state and subscribe to jael
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=. contacts.agents.state (~(put in contacts.agents.state) ship)
|
|
|
|
=/ =note-arvo [%j %public-keys (silt ship ~)]
|
|
|
|
=. moves
|
|
|
|
[[system-duct.agents.state %pass /sys/jael note-arvo] moves]
|
|
|
|
mo-core
|
|
|
|
:: +mo-untrack-rift: cancel jael subscription to .ship's breaches
|
2019-09-25 00:53:31 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
++ mo-untrack-rift
|
2019-09-25 00:53:31 +03:00
|
|
|
|= =ship
|
|
|
|
^+ mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
:: if already canceled, no-op
|
|
|
|
::
|
|
|
|
?. (~(has in contacts.agents.state) ship)
|
|
|
|
mo-core
|
|
|
|
:: delete .ship from state and kill subscription
|
|
|
|
::
|
|
|
|
=. contacts.agents.state (~(del in contacts.agents.state) ship)
|
2019-09-25 00:53:31 +03:00
|
|
|
=/ =note-arvo [%j %nuke (silt ship ~)]
|
|
|
|
=. moves
|
|
|
|
[[system-duct.agents.state %pass /sys/jael note-arvo] moves]
|
|
|
|
mo-core
|
|
|
|
:: +mo-breach: ship breached, so forget about them
|
|
|
|
::
|
|
|
|
++ mo-breach
|
|
|
|
|= =ship
|
|
|
|
^+ mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
=. mo-core (mo-untrack-rift ship)
|
2019-09-25 00:53:31 +03:00
|
|
|
=/ agents=(list [name=term =agent]) ~(tap by running.agents.state)
|
|
|
|
|- ^+ mo-core
|
|
|
|
?~ agents
|
|
|
|
mo-core
|
|
|
|
=. mo-core
|
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
|
|
|
=/ app (ap-abed:ap name.i.agents routes)
|
|
|
|
ap-abet:(ap-breach:app ship)
|
|
|
|
$(agents t.agents)
|
2019-06-26 00:25:03 +03:00
|
|
|
:: +mo-handle-sys: handle a +sign incoming over /sys.
|
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: (Note that /sys implies the +sign should be routed to a vane.)
|
2019-06-27 07:08:07 +03:00
|
|
|
::
|
2019-06-26 00:25:03 +03:00
|
|
|
++ mo-handle-sys
|
|
|
|
~/ %mo-handle-sys
|
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-06-26 00:25:03 +03:00
|
|
|
::
|
|
|
|
?+ -.path !!
|
2019-09-25 00:53:31 +03:00
|
|
|
%jael (mo-handle-sys-jael path sign-arvo)
|
2019-06-26 00:25:03 +03:00
|
|
|
%core (mo-handle-sys-core path sign-arvo)
|
|
|
|
%pel (mo-handle-sys-pel path sign-arvo)
|
|
|
|
%red (mo-handle-sys-red path sign-arvo)
|
|
|
|
%rep (mo-handle-sys-rep path sign-arvo)
|
|
|
|
%req (mo-handle-sys-req path sign-arvo)
|
|
|
|
%val (mo-handle-sys-val path sign-arvo)
|
|
|
|
%way (mo-handle-sys-way path sign-arvo)
|
|
|
|
==
|
2019-09-25 00:53:31 +03:00
|
|
|
:: +mo-handle-sys-jael: receive update about contact
|
|
|
|
::
|
|
|
|
++ mo-handle-sys-jael
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-core
|
|
|
|
?> ?=([%jael ~] path)
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%j %public-keys *] sign-arvo)
|
|
|
|
?. ?=(%breach -.public-keys-result.sign-arvo)
|
2019-09-25 00:53:31 +03:00
|
|
|
mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-breach who.public-keys-result.sign-arvo)
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-handle-sys-core: receive a core from %ford.
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-core
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
?> ?=([@ @ @ @ @ ~] path)
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%f %made *] sign-arvo)
|
2019-04-24 21:49:51 +03:00
|
|
|
=/ beak-path t.t.path
|
2019-04-13 19:06:25 +03:00
|
|
|
=/ =beak
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =ship (slav %p i.beak-path)
|
|
|
|
=/ =desk i.t.beak-path
|
|
|
|
=/ =case [%da (slav %da i.t.t.beak-path)]
|
2019-05-13 10:40:50 +03:00
|
|
|
[ship desk case]
|
2019-06-26 00:25:03 +03:00
|
|
|
(mo-receive-core i.t.path beak result.sign-arvo)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +mo-handle-sys-pel: translated peer.
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: Validates a received %ford result and %gives an internal %diff.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-pel
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%pel @ ~] path)
|
2019-04-11 23:27:53 +03:00
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?- result.sign-arvo
|
|
|
|
[%incomplete *]
|
|
|
|
(mo-give %unto %coup `tang.result.sign-arvo)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[%complete %error *]
|
|
|
|
(mo-give %unto %coup `message.build-result.result.sign-arvo)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[%complete %success *]
|
|
|
|
(mo-give %unto %diff (result-to-cage:ford build-result.result.sign-arvo))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +mo-handle-sys-rep: reverse request.
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: On receipt of a valid +sign from %ford, sets state to the appropriate
|
|
|
|
:: duct and gives an internal %diff containing the +sign payload.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-rep
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%rep @ @ *] path)
|
2019-04-11 23:27:53 +03:00
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?- result.sign-arvo
|
|
|
|
[%incomplete *]
|
|
|
|
(mo-give %done `[%gall-fail tang.result.sign-arvo])
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[%complete %error *]
|
|
|
|
(mo-give %done `[%gall-fail message.build-result.result.sign-arvo])
|
|
|
|
::
|
|
|
|
[%complete %success *]
|
|
|
|
(mo-give %unto %diff (result-to-cage:ford build-result.result.sign-arvo))
|
|
|
|
==
|
|
|
|
:: +mo-handle-sys-req: TODO description
|
|
|
|
::
|
|
|
|
:: TODO: what should we do if the remote nacks our %pull?
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-req
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%req @ @ @ ~] path)
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ him (slav %p i.t.path)
|
|
|
|
=/ dap i.t.t.path
|
|
|
|
=/ num (slav %ud i.t.t.t.path)
|
|
|
|
::
|
|
|
|
?> ?=([%g %unto *] sign-arvo)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-gift +>.sign-arvo
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.internal-gift
|
2019-04-11 23:27:53 +03:00
|
|
|
%coup
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ err=(unit error:ames)
|
|
|
|
?~ p.internal-gift ~
|
|
|
|
`[%coup u.p.internal-gift]
|
|
|
|
(mo-give %done err)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
%diff
|
2019-10-30 23:12:57 +03:00
|
|
|
=+ [mark noun]=[p q.q]:p.internal-gift
|
|
|
|
(mo-give %boon num %d mark noun)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
%quit
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-give %boon num %x ~)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
%reap
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ err=(unit error:ames)
|
|
|
|
?~ p.internal-gift ~
|
|
|
|
`[%reap u.p.internal-gift]
|
|
|
|
(mo-give %done err)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-07-02 00:13:19 +03:00
|
|
|
%http-response
|
|
|
|
!!
|
2019-04-11 23:27:53 +03:00
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +mo-handle-sys-val: inbound validate.
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: Validates an incoming +sign from %ford and applies it to the specified
|
|
|
|
:: agent.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-val
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
?> ?=([%f %made *] sign-arvo)
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%val @ @ ~] path)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =ship (slav %p i.t.path)
|
2019-05-28 09:49:17 +03:00
|
|
|
=/ =term i.t.t.path
|
2019-04-11 23:27:53 +03:00
|
|
|
?: ?=([%incomplete *] result.sign-arvo)
|
|
|
|
=/ err (some tang.result.sign-arvo)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
|
|
|
=/ build-result build-result.result.sign-arvo
|
|
|
|
?: ?=([%error *] build-result)
|
|
|
|
=/ err (some message.build-result)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent-action [%poke cage]
|
2019-08-15 20:40:03 +03:00
|
|
|
(mo-apply term routes agent-action)
|
2019-10-30 23:12:57 +03:00
|
|
|
:: +mo-handle-sys-way: handle response to outgoing remote request
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-sys-way
|
2019-04-11 23:27:53 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?> ?=([%way @ @ @ *] path)
|
|
|
|
=/ him (slav %p i.t.path)
|
|
|
|
=/ agent-name `@tas`i.t.t.path
|
|
|
|
=/ =remote-request ;;(remote-request i.t.t.t.path)
|
|
|
|
::
|
|
|
|
?+ sign-arvo !!
|
|
|
|
[%a %done *]
|
|
|
|
=/ err=(unit tang)
|
|
|
|
?~ error=error.sign-arvo
|
|
|
|
~
|
|
|
|
`[[%leaf (trip tag.u.error)] tang.u.error]
|
2019-06-29 04:13:32 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?- remote-request
|
|
|
|
%peel (mo-give %unto %reap err)
|
|
|
|
%peer (mo-give %unto %reap err)
|
|
|
|
%poke (mo-give %unto %coup err)
|
|
|
|
%pull mo-core
|
2016-12-16 09:34:01 +03:00
|
|
|
==
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[%a %boon *]
|
|
|
|
=/ =ames-response ;;(ames-response payload.sign-arvo)
|
|
|
|
(mo-handle-ames-response him agent-name ames-response)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[%a %lost *]
|
|
|
|
=/ sys-wire [%sys path]
|
|
|
|
:: TODO: %drip %quit so app crash can't kill the remote %pull
|
2019-08-28 06:12:56 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=. mo-core (mo-give %unto %quit ~)
|
|
|
|
=. mo-core (mo-pass sys-wire %a %plea him %g /ge/[agent-name] %u ~)
|
|
|
|
mo-core
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-handle-use: handle a typed +sign incoming on /use.
|
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: (Note that /use implies the +sign should be routed to an agent.)
|
2019-06-27 07:08:07 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: Initialises the specified agent and then performs an agent-level +take
|
|
|
|
:: on the supplied +sign.
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-use
|
|
|
|
~/ %mo-handle-use
|
2019-04-11 23:29:43 +03:00
|
|
|
|= [=path hin=(hypo sign-arvo)]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
|
|
|
?. ?=([@ @ coke *] path)
|
2019-05-13 10:40:50 +03:00
|
|
|
~& [%mo-handle-use-bad-path path]
|
2016-11-24 07:25:07 +03:00
|
|
|
!!
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
2019-06-02 09:27:59 +03:00
|
|
|
=/ app
|
2019-04-11 23:29:43 +03:00
|
|
|
=/ =term i.path
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =ship (slav %p i.t.path)
|
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
|
|
|
(ap-abed:ap term routes)
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =sign-arvo q.hin
|
2019-04-11 23:29:43 +03:00
|
|
|
?- i.t.t.path
|
|
|
|
%inn
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =vase (slot 3 hin)
|
2019-06-02 09:27:59 +03:00
|
|
|
=. app (ap-generic-take:app t.t.t.path vase)
|
|
|
|
ap-abet:app
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:29:43 +03:00
|
|
|
%cay
|
2019-07-02 00:13:19 +03:00
|
|
|
~& [%mo-handle-use-weird sign-arvo]
|
|
|
|
~& [%mo-handle-use-weird-path path]
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:29:43 +03:00
|
|
|
%out
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?=([%g %unto *] sign-arvo)
|
2019-05-13 10:40:50 +03:00
|
|
|
~& [%mo-handle-use-weird sign-arvo]
|
|
|
|
~& [%mo-handle-use-weird-path path]
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core
|
2019-06-02 09:27:59 +03:00
|
|
|
=. app
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-gift +>.sign-arvo
|
2019-06-02 09:27:59 +03:00
|
|
|
(ap-specific-take:app t.t.t.path internal-gift)
|
|
|
|
ap-abet:app
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-06-27 07:08:07 +03:00
|
|
|
:: +mo-clear-queue: clear blocked tasks from the specified running agent.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-clear-queue
|
2019-05-28 09:49:17 +03:00
|
|
|
|= =term
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:30:44 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
?. (~(has by running.agents.state) term)
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ maybe-blocked (~(get by blocked.agents.state) term)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-blocked
|
2019-08-16 02:00:27 +03:00
|
|
|
mo-core
|
2019-04-11 23:30:44 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =blocked u.maybe-blocked
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
|- ^+ mo-core
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(~ blocked)
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ blocked (~(del by blocked.agents.state) term)
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ mo-core
|
2019-08-15 19:14:09 +03:00
|
|
|
blocked.agents.state blocked
|
2019-04-11 23:30:44 +03:00
|
|
|
==
|
2019-05-29 10:46:55 +03:00
|
|
|
=^ task blocked [p q]:~(get to blocked)
|
|
|
|
=/ =duct p.task
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =routes q.task
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =agent-action r.task
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ move
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =sock [attributing.routes our]
|
2019-05-28 09:49:17 +03:00
|
|
|
=/ =internal-task [term agent-action]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ card [%slip %g %deal sock internal-task]
|
|
|
|
[duct card]
|
2019-04-11 23:30:44 +03:00
|
|
|
$(moves [move moves])
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-beak: assemble a beak for the specified agent.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:30:44 +03:00
|
|
|
++ mo-beak
|
2019-05-28 09:49:17 +03:00
|
|
|
|= =term
|
2016-11-24 07:25:07 +03:00
|
|
|
^- beak
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
?~ running=(~(get by running.agents.state) term)
|
2019-05-28 09:49:17 +03:00
|
|
|
:: XX this fallback is necessary, as .term could be either the source
|
2019-07-16 09:10:49 +03:00
|
|
|
:: or the destination app. ie, it might not exist locally ...
|
|
|
|
::
|
|
|
|
[our %home %da now]
|
2019-08-14 14:57:51 +03:00
|
|
|
beak.u.running
|
|
|
|
:: +mo-peek: call to +ap-peek (which is not accessible outside of +mo).
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ mo-peek
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-peek
|
2019-08-15 20:40:03 +03:00
|
|
|
|= [agent=term =routes =term =path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ app (ap-abed:ap agent routes)
|
2019-06-02 09:27:59 +03:00
|
|
|
(ap-peek:app term path)
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +mo-apply: apply the supplied action to the specified agent.
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-apply
|
2019-10-30 23:12:57 +03:00
|
|
|
|= [agent=term =routes =agent-action]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
=/ =path
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ ship (scot %p attributing.routes)
|
2019-10-30 23:12:57 +03:00
|
|
|
/sys/val/[ship]/[agent]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ ship-desk
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =beak (mo-beak agent)
|
2019-04-11 23:31:55 +03:00
|
|
|
[p q]:beak
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%puff -.agent-action)
|
|
|
|
=/ =schematic:ford [%vale ship-desk +.agent-action]
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ =note-arvo [%f %build live=%.n schematic]
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%punk -.agent-action)
|
|
|
|
=/ =schematic:ford [%cast ship-desk p.agent-action [%$ q.agent-action]]
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ =note-arvo [%f %build live=%.n schematic]
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%peer-not -.agent-action)
|
|
|
|
=/ err (some p.agent-action)
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-give %unto %reap err)
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ app (ap-abed:ap agent routes)
|
2019-06-02 09:27:59 +03:00
|
|
|
=. app (ap-apply:app agent-action)
|
|
|
|
ap-abet:app
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +mo-handle-local: handle locally.
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: If the agent is running or blocked, assign it the supplied +task.
|
|
|
|
:: Otherwise simply apply the action to the agent.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ mo-handle-local
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =internal-task]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ agent p.internal-task
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent-action q.internal-task
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ is-running (~(has by running.agents.state) agent)
|
|
|
|
=/ is-blocked (~(has by blocked.agents.state) agent)
|
2019-04-26 08:16:46 +03:00
|
|
|
::
|
2019-06-26 00:25:03 +03:00
|
|
|
?: |(!is-running is-blocked)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =blocked
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ waiting (~(get by blocked.agents.state) agent)
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ tasks (fall waiting *blocked)
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ task [hen routes agent-action]
|
2019-05-29 10:46:55 +03:00
|
|
|
(~(put to tasks) task)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
blocked.agents.state (~(put by blocked.agents.state) agent blocked)
|
2018-06-06 03:11:06 +03:00
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-apply agent routes agent-action)
|
|
|
|
:: +mo-handle-ames-request: handle ames request message
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
++ mo-handle-ames-request
|
|
|
|
|= [=ship agent-name=term =ames-request]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-10-30 23:12:57 +03:00
|
|
|
:: %u/%pull gets automatically acked
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=? mo-core !?=(%u -.ames-request) (mo-give %done ~)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =wire /sys/req/(scot %p ship)/[agent-name]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =agent-action
|
|
|
|
?- -.ames-request
|
|
|
|
%m [%puff [mark noun]:ames-request]
|
|
|
|
%l [%peel [mark path]:ames-request]
|
|
|
|
%s [%peer path.ames-request]
|
|
|
|
%u [%pull ~]
|
2019-04-11 23:31:55 +03:00
|
|
|
==
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-pass wire %g %deal [ship our] agent-name agent-action)
|
|
|
|
:: +mo-handle-ames-response: handle ames response message
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
++ mo-handle-ames-response
|
|
|
|
|= [=ship agent-name=term =subscription=path =ames-response]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
?- -.ames-response
|
|
|
|
:: %d: diff; ask ford to validate .noun as .mark
|
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
%d
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =wire
|
|
|
|
=- (weld - subscription-path)
|
|
|
|
/sys/rep/(scot %p ship)/[agent-name]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
=/ =note-arvo
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =disc:ford [p q]:(mo-beak term)
|
|
|
|
[%f %build live=%.n %vale disc [mark noun]:ames-response]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
(mo-pass wire note-arvo)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
:: %x: quit; tell agent the publisher canceled the subscription
|
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
%x
|
2019-08-28 06:12:56 +03:00
|
|
|
(mo-give %unto %quit ~)
|
2015-05-10 01:55:05 +03:00
|
|
|
==
|
2019-04-27 08:05:43 +03:00
|
|
|
:: +ap: agent engine
|
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: An inner, agent-level core. The sample refers to the agent we're
|
|
|
|
:: currently focused on.
|
2019-08-14 14:57:51 +03:00
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
++ ap
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-ap +> ~
|
2019-06-02 09:57:06 +03:00
|
|
|
|_ $: agent-name=term
|
2019-08-15 20:40:03 +03:00
|
|
|
agent-routes=routes
|
2019-06-02 09:57:06 +03:00
|
|
|
agent-bone=bone
|
|
|
|
agent-moves=(list internal-move)
|
|
|
|
agent-config=(list (each suss tang))
|
2019-07-03 05:36:54 +03:00
|
|
|
current-agent=agent
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-08-16 02:00:27 +03:00
|
|
|
++ ap-core .
|
2019-08-15 20:40:03 +03:00
|
|
|
:: +ap-abed: initialise state for an agent, with the supplied routes.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: The agent must already be running in +gall -- here we simply update
|
|
|
|
:: +ap's state to focus on it.
|
2019-04-27 08:05:43 +03:00
|
|
|
::
|
|
|
|
++ ap-abed
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-abed
|
2019-08-15 20:40:03 +03:00
|
|
|
|= [=term =routes]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:05:43 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ running (~(got by running.agents.state) term)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =stats
|
2019-05-30 07:10:52 +03:00
|
|
|
:+ +(change.stats.running)
|
|
|
|
(shaz (mix (add term change.stats.running) eny))
|
|
|
|
now
|
2019-05-06 05:17:46 +03:00
|
|
|
running(stats stats)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=. agent-name term
|
2019-08-15 20:40:03 +03:00
|
|
|
=. agent-routes routes
|
2019-07-03 05:36:54 +03:00
|
|
|
=. current-agent agent
|
2019-06-12 14:25:49 +03:00
|
|
|
=/ maybe-bone (~(get by bone-map.ducts.agent) hen)
|
2019-04-28 23:42:04 +03:00
|
|
|
?^ maybe-bone
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(agent-bone u.maybe-bone)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =ducts
|
2019-05-30 07:10:52 +03:00
|
|
|
:+ +(bone.ducts.agent)
|
|
|
|
(~(put by bone-map.ducts.agent) hen bone.ducts.agent)
|
|
|
|
(~(put by duct-map.ducts.agent) bone.ducts.agent hen)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ ap-core
|
2019-07-03 05:36:54 +03:00
|
|
|
agent-bone bone.ducts.agent
|
|
|
|
ducts.current-agent ducts
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-27 08:05:43 +03:00
|
|
|
:: +ap-abet: resolve moves.
|
|
|
|
::
|
|
|
|
++ ap-abet
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ mo-core
|
2019-04-27 08:05:43 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
=> ap-track-queue
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ running (~(put by running.agents.state) agent-name current-agent)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ moves
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ giver |=(report=(each suss tang) [hen %give %onto report])
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ from-internal (turn agent-moves ap-from-internal)
|
|
|
|
=/ from-suss (turn agent-config giver)
|
2019-05-06 05:17:46 +03:00
|
|
|
:(weld from-internal from-suss moves)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ mo-core
|
2019-08-15 19:14:09 +03:00
|
|
|
running.agents.state running
|
2019-08-15 23:13:05 +03:00
|
|
|
moves moves
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-track-queue: track queue.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-track-queue
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ internal-moves agent-moves
|
2019-04-28 23:42:04 +03:00
|
|
|
=/ bones *(set bone)
|
2019-08-16 02:00:27 +03:00
|
|
|
|- ^+ ap-core
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ internal-moves
|
2019-10-30 23:12:57 +03:00
|
|
|
=? bones ?=([%give %diff *] move.i.internal-moves)
|
|
|
|
(~(put in bones) bone.i.internal-moves)
|
2019-07-03 05:36:54 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
$(internal-moves t.internal-moves)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-06-12 14:25:49 +03:00
|
|
|
=/ bones ~(tap in bones)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
|- ^+ ap-core
|
2019-06-12 14:25:49 +03:00
|
|
|
?~ bones
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-06-12 14:25:49 +03:00
|
|
|
=> $(bones t.bones, agent-bone i.bones)
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ incoming
|
|
|
|
(~(get by incoming.subscribers.current-agent) agent-bone)
|
2019-06-12 14:25:49 +03:00
|
|
|
?~ incoming
|
2019-06-02 09:57:06 +03:00
|
|
|
~& [%ap-track-queue-bad-bone agent-name agent-bone]
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-06-12 14:25:49 +03:00
|
|
|
=/ =ship p.u.incoming
|
2019-08-15 20:40:03 +03:00
|
|
|
ap-kill(attributing.agent-routes ship)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-from-internal: internal move to move.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-15 19:31:07 +03:00
|
|
|
:: We convert from bone-indexed moves to duct-indexed moves when
|
|
|
|
:: resolving them in Arvo.
|
2019-06-12 14:25:49 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-from-internal
|
|
|
|
~/ %ap-from-internal
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =internal-move
|
2019-01-18 08:37:34 +03:00
|
|
|
^- move
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
~| [%gall-move-conversion-failed internal-move]
|
|
|
|
=/ =duct
|
|
|
|
(~(got by duct-map.ducts.current-agent) bone.internal-move)
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ card
|
|
|
|
?- -.move.internal-move
|
|
|
|
%slip !!
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
%give
|
|
|
|
?< =(0 bone.internal-move)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-gift p.move.internal-move
|
|
|
|
?. ?=(%diff -.internal-gift)
|
|
|
|
[%give %unto internal-gift]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =cage p.internal-gift
|
|
|
|
=/ =mark
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ mark (~(get by marks.current-agent) bone.internal-move)
|
|
|
|
(fall mark p.cage)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(mark p.cage)
|
|
|
|
[%give %unto internal-gift]
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ =path /sys/pel/[agent-name]
|
|
|
|
=/ =note-arvo
|
|
|
|
=/ =schematic:ford
|
|
|
|
=/ =beak (mo-beak agent-name)
|
|
|
|
[%cast [p q]:beak mark [%$ cage]]
|
|
|
|
[%f %build live=%.n schematic]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[%pass path note-arvo]
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
%pass
|
|
|
|
=/ =path p.move.internal-move
|
|
|
|
=/ =internal-note q.move.internal-move
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ use-path [%use agent-name path]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
2019-08-15 20:51:50 +03:00
|
|
|
?- -.internal-note
|
2019-05-06 05:17:46 +03:00
|
|
|
%send
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =task:able
|
|
|
|
=/ =sock [our ship.internal-note]
|
|
|
|
=/ =internal-task internal-task.internal-note
|
|
|
|
[%deal sock internal-task]
|
|
|
|
[%g task]
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
%meta
|
|
|
|
=/ =term term.internal-note
|
|
|
|
=/ =vase vase.internal-note
|
|
|
|
[term %meta vase]
|
|
|
|
==
|
|
|
|
[%pass use-path note-arvo]
|
|
|
|
==
|
|
|
|
[duct card]
|
2019-09-25 00:53:31 +03:00
|
|
|
:: +ap-breach: ship breached, so forget about them
|
|
|
|
::
|
|
|
|
++ ap-breach
|
|
|
|
|= =ship
|
|
|
|
^+ ap-core
|
|
|
|
=/ in=(list [=bone =^ship =path])
|
|
|
|
~(tap by incoming.subscribers.current-agent)
|
|
|
|
|- ^+ ap-core
|
|
|
|
?^ in
|
|
|
|
=? ap-core =(ship ship.i.in)
|
|
|
|
=/ core ap-load-delete(agent-bone bone.i.in)
|
|
|
|
core(agent-bone agent-bone)
|
|
|
|
$(in t.in)
|
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ out=(list [[=bone =wire] ? =^ship =path])
|
2019-09-25 00:53:31 +03:00
|
|
|
~(tap by outgoing.subscribers.current-agent)
|
|
|
|
|- ^+ ap-core
|
|
|
|
?~ out
|
|
|
|
ap-core
|
|
|
|
=? ap-core =(ship ship.i.out)
|
|
|
|
=/ core (ap-specific-take(agent-bone bone.i.out) wire.i.out %quit ~)
|
|
|
|
core(agent-bone agent-bone)
|
|
|
|
$(out t.out)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-call: call into server.
|
|
|
|
::
|
|
|
|
++ ap-call
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-call
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(unit tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=. ap-core ap-construct-bowl
|
|
|
|
=^ arm ap-core (ap-produce-arm term)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some p.arm) ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ arm ap-core (ap-slam term p.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some p.arm) ap-core]
|
2019-05-13 10:40:50 +03:00
|
|
|
(ap-handle-result p.arm)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peek: peek.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ ap-peek
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-peek
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term tyl=path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ marked
|
|
|
|
?. ?=(%x term)
|
2019-05-03 01:53:27 +03:00
|
|
|
[mark=%$ tyl=tyl]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =path (flop tyl)
|
|
|
|
?> ?=(^ path)
|
|
|
|
[mark=i.path tyl=(flop t.path)]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =mark mark.marked
|
|
|
|
=/ tyl tyl.marked
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm %peek term tyl)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek find fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank >tyl< >mark< ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ arm ap-core (ap-produce-arm q.u.maybe-arm)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek farm fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank p.arm)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ slammed
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ index p.u.maybe-arm
|
|
|
|
=/ term q.u.maybe-arm
|
|
|
|
=/ =vase
|
|
|
|
=/ =path [term tyl]
|
2019-05-31 06:21:26 +03:00
|
|
|
!> (slag index path)
|
2019-05-06 05:17:46 +03:00
|
|
|
(ap-slam term p.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-vase ap-core slammed
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek slam fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank p.possibly-vase)
|
|
|
|
(print [~ ~])
|
|
|
|
::
|
|
|
|
=/ slammed-vase p.possibly-vase
|
|
|
|
=/ vase-value q.slammed-vase
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ err
|
2019-08-27 02:46:03 +03:00
|
|
|
|.
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek bad result"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-27 02:46:03 +03:00
|
|
|
?+ vase-value $:err
|
2019-05-06 05:17:46 +03:00
|
|
|
~
|
|
|
|
~
|
2019-08-15 23:52:44 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[~ ~]
|
|
|
|
[~ ~]
|
2019-08-15 23:52:44 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
[~ ~ ^]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =vase (sped (slot 7 slammed-vase))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. ?=([p=@ *] q.vase)
|
|
|
|
=/ =tank [%leaf "scry: malformed cage"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-31 06:21:26 +03:00
|
|
|
?. ((sane %tas) p.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "scry: malformed cage"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. =(mark p.q.vase)
|
|
|
|
[~ ~]
|
|
|
|
::
|
|
|
|
=/ =cage [p.q.vase (slot 3 vase)]
|
|
|
|
(some (some cage))
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-apply: apply effect.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-apply
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =agent-action
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.agent-action
|
|
|
|
%peel (ap-peel +.agent-action)
|
|
|
|
%poke (ap-poke +.agent-action)
|
|
|
|
%peer (ap-peer +.agent-action)
|
2019-05-03 01:53:27 +03:00
|
|
|
%puff !!
|
|
|
|
%punk !!
|
|
|
|
%peer-not !!
|
2019-05-13 10:40:50 +03:00
|
|
|
%pull ap-load-delete
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-diff: pour a diff.
|
|
|
|
::
|
|
|
|
++ ap-diff
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-diff
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =path =cage]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ rest +.path
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ pax [p.cage rest]
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm %diff pax)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
|
|
|
=/ target [%.n ship rest]
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ why "diff: no {<[p.cage rest]>}"
|
2019-05-13 10:40:50 +03:00
|
|
|
(ap-tang why)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=. ap-core (ap-lame %diff tang)
|
2019-06-02 09:27:59 +03:00
|
|
|
(ap-update-subscription target)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =vase
|
|
|
|
=/ target
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(0 p.arm)
|
|
|
|
=/ =vase (ap-cage cage)
|
|
|
|
[!>(rest) vase]
|
|
|
|
[!>((slag (dec p.arm) rest)) q.cage]
|
2019-05-03 01:53:27 +03:00
|
|
|
(slop target)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ called ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ called
|
2019-08-16 02:00:27 +03:00
|
|
|
=. ap-core (ap-lame q.arm u.called)
|
2019-06-02 09:27:59 +03:00
|
|
|
(ap-update-subscription %.n ship path)
|
2019-05-13 10:40:50 +03:00
|
|
|
(ap-update-subscription %.y ship path)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-cage: cage to tagged vase.
|
|
|
|
::
|
|
|
|
++ ap-cage
|
2019-05-13 10:40:50 +03:00
|
|
|
|= =cage
|
2019-05-29 01:37:42 +03:00
|
|
|
^- vase
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
|
|
|
=/ =type [%atom %tas (some p.cage)]
|
|
|
|
=/ =vase [type p.cage]
|
|
|
|
(slop vase q.cage)
|
|
|
|
:: +ap-update-subscription: update subscription.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-update-subscription
|
|
|
|
~/ %ap-update-subscription
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [is-ok=? =ship =path]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?: is-ok
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-10-30 23:12:57 +03:00
|
|
|
:: not ok; kill in both directions with %quit and %pull
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=. ap-core (ap-give %quit ~)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ way [(scot %p ship) %out path]
|
|
|
|
=/ =internal-note [%send ship -.path %pull ~]
|
|
|
|
(ap-pass way internal-note)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-produce-arm: produce arm.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-produce-arm
|
|
|
|
~/ %ap-produce-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each vase tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ compiled
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ =type p.running-state.current-agent
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =hoon [%limb term]
|
2019-07-03 05:36:54 +03:00
|
|
|
(~(mint wa cache.current-agent) type hoon)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ virtual
|
|
|
|
=/ trap |.(compiled)
|
|
|
|
(mule trap)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.virtual)
|
|
|
|
=/ =tang p.virtual
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-vase=(each vase tang)
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ value q.running-state.current-agent
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ ton (mock [value q.+<.virtual] ap-namespace-view)
|
2019-05-03 01:53:27 +03:00
|
|
|
?- -.ton
|
2019-05-06 05:17:46 +03:00
|
|
|
%0 [%.y p.+<.virtual p.ton]
|
|
|
|
%1 [%.n (turn p.ton |=(a=* (smyt (path a))))]
|
2019-05-03 01:53:27 +03:00
|
|
|
%2 [%.n p.ton]
|
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ next
|
|
|
|
=/ =worm +>.virtual
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(cache.current-agent worm)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
[possibly-vase next]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-find-arm: general arm.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-find-arm
|
|
|
|
~/ %ap-find-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =path]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(unit (pair @ud @tas)) _ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ maybe-cached (~(get by arm-cache.current-agent) [term path])
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-cached
|
2019-08-16 02:00:27 +03:00
|
|
|
[u.maybe-cached ap-core]
|
2018-11-25 01:20:22 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ result
|
|
|
|
=/ dep 0
|
|
|
|
|- ^- (unit (pair @ud @tas))
|
|
|
|
=/ spu
|
|
|
|
?~ path
|
|
|
|
~
|
|
|
|
=/ hyped (cat 3 term (cat 3 '-' i.path))
|
|
|
|
$(path t.path, dep +(dep), term hyped)
|
|
|
|
::
|
|
|
|
?^ spu
|
|
|
|
spu
|
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
?. (ap-exists-arm term)
|
2019-05-03 01:53:27 +03:00
|
|
|
~
|
|
|
|
(some [dep term])
|
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=. arm-cache.current-agent
|
|
|
|
(~(put by arm-cache.current-agent) [term path] result)
|
2019-08-16 02:00:27 +03:00
|
|
|
[result ap-core]
|
2019-06-12 14:25:49 +03:00
|
|
|
:: +ap-exists-arm: check for an arm in the running agent state.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-exists-arm
|
|
|
|
~/ %ap-exists-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2016-11-24 07:25:07 +03:00
|
|
|
^- ?
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ =type p.running-state.current-agent
|
2019-05-06 05:17:46 +03:00
|
|
|
(slob term type)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-give: return result.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-give
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =internal-gift
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves
|
|
|
|
=/ move [%give internal-gift]
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ =internal-move [agent-bone move]
|
|
|
|
[internal-move agent-moves]
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(agent-moves internal-moves)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-construct-bowl: set up bowl.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-construct-bowl
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ ap-core
|
2019-07-03 05:36:54 +03:00
|
|
|
+12.q.running-state.current-agent
|
2016-11-24 07:25:07 +03:00
|
|
|
^- bowl
|
2019-08-14 14:57:51 +03:00
|
|
|
:* :* our :: host
|
2019-08-15 20:40:03 +03:00
|
|
|
attributing.agent-routes :: guest
|
2019-08-14 14:57:51 +03:00
|
|
|
agent-name :: agent
|
|
|
|
== ::
|
2019-08-27 19:40:11 +03:00
|
|
|
:* :: NB (jtobin): see urbit/urbit#1466
|
2019-08-15 23:22:45 +03:00
|
|
|
wex=~ :: outgoing
|
2019-08-14 14:57:51 +03:00
|
|
|
sup=incoming.subscribers.current-agent :: incoming
|
|
|
|
== ::
|
|
|
|
:* agent-bone=agent-bone :: cause
|
|
|
|
act=change.stats.current-agent :: tick
|
|
|
|
eny=eny.stats.current-agent :: nonce
|
|
|
|
now=time.stats.current-agent :: time
|
|
|
|
byk=beak.current-agent :: source
|
|
|
|
== ==
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move: process each move.
|
|
|
|
::
|
|
|
|
++ ap-move
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-move
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ noun q.vase
|
|
|
|
?@ noun
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: invalid move (atom)")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ -.noun
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: invalid move (bone)")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?@ +.noun
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: invalid move (card)")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =bone -.noun
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ has-duct (~(has by duct-map.ducts.current-agent) bone)
|
2019-05-06 05:17:46 +03:00
|
|
|
?. &(has-duct !=(0 bone))
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: invalid card (bone {<bone>})")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ vase cache.current-agent (~(spot wa cache.current-agent) 3 vase)
|
|
|
|
=^ vase cache.current-agent (~(slot wa cache.current-agent) 3 vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?+ +<.noun (ap-move-pass bone +<.noun vase)
|
|
|
|
%diff (ap-move-diff bone vase)
|
|
|
|
%peel (ap-move-peel bone vase)
|
|
|
|
%peer (ap-move-peer bone vase)
|
|
|
|
%pull (ap-move-pull bone vase)
|
|
|
|
%poke (ap-move-poke bone vase)
|
|
|
|
%send (ap-move-send bone vase)
|
|
|
|
%quit (ap-move-quit bone vase)
|
2019-07-02 00:13:19 +03:00
|
|
|
%http-response (ap-move-http-response bone vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-quit: give quit move.
|
|
|
|
::
|
|
|
|
++ ap-move-quit
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %quit
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-internal-move=(each internal-move tang)
|
2019-05-03 01:53:27 +03:00
|
|
|
?^ q.vase
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "quit: improper give")
|
2019-05-03 01:53:27 +03:00
|
|
|
[%.n tang]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ =internal-move
|
|
|
|
=/ =internal-gift [%quit ~]
|
|
|
|
=/ move [%give internal-gift]
|
|
|
|
[bone move]
|
|
|
|
::
|
|
|
|
[%.y internal-move]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ next
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ incoming (~(del by incoming.subscribers.current-agent) bone)
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ ap-core
|
2019-07-03 05:36:54 +03:00
|
|
|
incoming.subscribers.current-agent incoming
|
2019-05-06 05:17:46 +03:00
|
|
|
==
|
|
|
|
[possibly-internal-move next]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-diff: give diff move.
|
|
|
|
::
|
|
|
|
++ ap-move-diff
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %diff
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ vase cache.current-agent (~(sped wa cache.current-agent) vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ value q.vase
|
|
|
|
?. ?& ?=(^ value)
|
|
|
|
?=(@ -.value)
|
|
|
|
((sane %tas) -.value)
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "diff: improper give")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ vase cache.current-agent (~(slot wa cache.current-agent) 3 vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move
|
|
|
|
=/ =cage [-.value vase]
|
|
|
|
=/ move [%give %diff cage]
|
|
|
|
[bone move]
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y internal-move] ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +ap-move-http-response
|
|
|
|
::
|
|
|
|
++ ap-move-http-response
|
|
|
|
|= [sto=bone vax=vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
:: TODO: Magic vase validation. I have no idea how malformed checking
|
|
|
|
:: works.
|
2019-02-12 01:41:50 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
:_ ap-core
|
2019-06-19 21:09:53 +03:00
|
|
|
[%& sto %give %http-response ;;(http-event:http q.vax)]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-mess: extract path, target.
|
|
|
|
::
|
|
|
|
++ ap-move-mess
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mess
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each (trel path ship term) tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-trel=(each (trel path ship term) tang)
|
2019-05-03 01:53:27 +03:00
|
|
|
?. ?& ?=([p=* [q=@ r=@] s=*] q.vase)
|
|
|
|
(gte 1 (met 7 q.q.vase))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "mess: malformed target")
|
2019-05-03 01:53:27 +03:00
|
|
|
[%.n tang]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) p.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "mess: malformed path")
|
2019-05-03 01:53:27 +03:00
|
|
|
[%.n tang]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =ship q.q.vase
|
|
|
|
=/ =term r.q.vase
|
|
|
|
[%.y path ship term]
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-trel ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-pass: pass general move.
|
|
|
|
::
|
|
|
|
++ ap-move-pass
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %pass
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =noun =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(@ noun)
|
|
|
|
((sane %tas) noun)
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "pass: malformed card")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) -.q.vase)
|
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-07-02 00:13:19 +03:00
|
|
|
=/ =tang (ap-tang "pass: malformed path")
|
|
|
|
~& [%bad-path pax]
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-vane (ap-vain noun)
|
|
|
|
?~ maybe-vane
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: unknown note {(trip noun)}")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ vane u.maybe-vane
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ at-slot cache.current-agent
|
|
|
|
(~(slot wa cache.current-agent) 3 vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =path [(scot %p attributing.agent-routes) %inn u.pax]
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ vase (ap-atomic-vase %tas noun)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ combined (slop vase at-slot)
|
|
|
|
=/ =internal-note [%meta vane combined]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y internal-move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-poke: pass %poke.
|
|
|
|
::
|
|
|
|
++ ap-move-poke
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %poke
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-target ap-core (ap-move-mess vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-target ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ at-slot cache.current-agent
|
|
|
|
(~(slot wa cache.current-agent) 7 vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=([p=@ q=*] q.at-slot)
|
|
|
|
((sane %tas) p.q.at-slot)
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "poke: malformed cage")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ specialised cache.current-agent
|
|
|
|
(~(stop wa cache.current-agent) 3 at-slot)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =path p.target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
|
|
|
::
|
|
|
|
=/ =internal-move
|
|
|
|
=/ =internal-task [term %poke p.q.at-slot specialised]
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y internal-move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-peel: pass %peel.
|
|
|
|
::
|
|
|
|
++ ap-move-peel
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %peel
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-target ap-core (ap-move-mess vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-target ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
|
|
|
=/ mark ((soft mark) +>-.q.vase)
|
|
|
|
?~ mark
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "peel: malformed mark")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) +>+.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "peel: malformed path")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
2019-07-03 05:36:54 +03:00
|
|
|
?: (~(has in misvale.current-agent) p.target)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-task
|
|
|
|
=/ =tang [[%leaf "peel: misvalidation encountered"] ~]
|
|
|
|
=/ =agent-action [%peer-not tang]
|
|
|
|
[term agent-action]
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
=/ =agent-action [%peel u.mark u.pax]
|
|
|
|
=/ =internal-task [term agent-action]
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-peer: pass %peer.
|
|
|
|
::
|
|
|
|
++ ap-move-peer
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %peer
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-target ap-core (ap-move-mess vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-target ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
|
|
|
=/ pax ((soft path) +>.q.vase)
|
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "peer: malformed path")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
2019-07-03 05:36:54 +03:00
|
|
|
?: (~(has in misvale.current-agent) p.target)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ err [[%leaf "peer: misvalidation encountered"] ~]
|
|
|
|
=/ =agent-action [%peer-not err]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
=/ =agent-action [%peer u.pax]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-pull: pass %pull.
|
|
|
|
::
|
|
|
|
++ ap-move-pull
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %pull
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-target ap-core (ap-move-mess vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-target ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
2019-05-03 01:53:27 +03:00
|
|
|
?. =(~ +>.q.vase)
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "pull: malformed card")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
|
|
|
=/ =agent-action [%pull ~]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-send: pass gall action.
|
|
|
|
::
|
|
|
|
++ ap-move-send
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %send
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each internal-move tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?. ?& ?=([p=* [q=@ r=@] [s=@ t=*]] q.vase)
|
|
|
|
(gte 1 (met 7 q.q.vase))
|
|
|
|
((sane %tas) r.q.vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-08-14 14:57:51 +03:00
|
|
|
=/ =tang
|
|
|
|
(ap-tang "send: improper ask.[%send wire gill agent-action]")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) p.q.vase)
|
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "send: malformed path")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?: ?=($poke s.q.vase)
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ specialised cache.current-agent
|
|
|
|
(~(spot wa cache.current-agent) 7 vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?> =(%poke -.q.specialised)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. ?& ?=([p=@ q=*] t.q.vase)
|
|
|
|
((sane %tas) p.t.q.vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "send: malformed poke")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ specialised cache.current-agent
|
|
|
|
(~(spot wa cache.current-agent) 3 specialised)
|
|
|
|
=^ at-slot cache.current-agent
|
|
|
|
(~(slot wa cache.current-agent) 3 specialised)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ move
|
|
|
|
=/ =agent-action [%poke p.t.q.vase at-slot]
|
|
|
|
=/ =internal-note [%send q.q.vase r.q.vase agent-action]
|
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y move] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-action ((soft agent-action) [s t]:q.vase)
|
|
|
|
?~ maybe-action
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "send: malformed agent-action")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ move
|
|
|
|
=/ =agent-action u.maybe-action
|
|
|
|
=/ =internal-note [%send q.q.vase r.q.vase agent-action]
|
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y move] ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-pass: request action.
|
|
|
|
::
|
|
|
|
++ ap-pass
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =internal-note]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move
|
|
|
|
=/ move [%pass path internal-note]
|
2019-06-02 09:57:06 +03:00
|
|
|
[agent-bone move]
|
|
|
|
=/ internal-moves [internal-move agent-moves]
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(agent-moves internal-moves)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-reinstall: reinstall.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-reinstall
|
|
|
|
~/ %ap-reinstall
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ prep
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ installed ap-install(running-state.current-agent vase)
|
|
|
|
=/ running (some running-state.current-agent)
|
2019-05-06 05:17:46 +03:00
|
|
|
(installed running)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core prep
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-tang
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-06 05:17:46 +03:00
|
|
|
(ap-lame %prep-failed u.maybe-tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peel: apply %peel.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ ap-peel
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=mark =path]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=. marks.current-agent (~(put by marks.current-agent) agent-bone mark)
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-peer path)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peer: apply %peer.
|
|
|
|
::
|
|
|
|
++ ap-peer
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-peer
|
2019-04-27 08:42:04 +03:00
|
|
|
|= pax=path
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ incoming [attributing.agent-routes pax]
|
2019-07-03 05:36:54 +03:00
|
|
|
=. incoming.subscribers.current-agent
|
|
|
|
(~(put by incoming.subscribers.current-agent) agent-bone incoming)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm %peer pax)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>((slag p.arm pax))
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ old agent-moves
|
|
|
|
=. agent-moves ~
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves=(list internal-move)
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ move [agent-bone %give %reap maybe-tang]
|
2019-05-06 05:17:46 +03:00
|
|
|
[move old]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=. agent-moves (weld agent-moves internal-moves)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
2019-05-13 10:40:50 +03:00
|
|
|
ap-silent-delete
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-poke: apply %poke.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-poke
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-poke
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =cage
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm %poke p.cage ~)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "no poke arm for {(trip p.cage)}")
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-give %coup (some tang))
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ vas (ap-atomic-vase %tas p.cage)
|
2019-05-06 05:17:46 +03:00
|
|
|
?. =(0 p.arm)
|
|
|
|
q.cage
|
|
|
|
(slop vas q.cage)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ tur ap-core (ap-call q.arm vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
(ap-give %coup tur)
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-lame: pour error.
|
|
|
|
::
|
|
|
|
++ ap-lame
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =tang]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm /lame)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ form |=(=tank [%rose [~ "! " ~] tank ~])
|
|
|
|
?~ maybe-arm
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ tang [>%ap-lame agent-name term< (turn tang form)]
|
2019-05-03 01:53:27 +03:00
|
|
|
~> %slog.`rose+[" " "[" "]"]^(flop tang)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>([term tang])
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
=/ tang u.maybe-tang
|
|
|
|
=/ etc (flop [>%ap-lame-lame< (turn tang form)])
|
|
|
|
~> %slog.`rose+[" " "[" "]"]^(welp etc [%leaf "." (flop tang)])
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-misvale: broken vale.
|
|
|
|
::
|
|
|
|
++ ap-misvale
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =wire
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
~& [%ap-blocking-misvale wire]
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ misvaled (~(put in misvale.current-agent) wire)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(misvale.current-agent misvaled)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-generic-take: generic take.
|
2016-11-04 04:35:47 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-generic-take
|
|
|
|
~/ %ap-generic-take
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?. &(?=([@ *] q.vase) ((sane %tas) -.q.vase))
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "pour: malformed card")
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-lame %pour tang)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =term -.q.vase
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm [term path])
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "pour: no {(trip -.q.vase)}: {<path>}")
|
2019-05-06 05:17:46 +03:00
|
|
|
(ap-lame term tang)
|
|
|
|
::
|
|
|
|
=/ arm u.maybe-arm
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ at-slot cache.current-agent
|
|
|
|
(~(slot wa cache.current-agent) 3 vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ vase (slop !>((slag p.arm path)) at-slot)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame term u.maybe-tang)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-unwrap-take: unwrap take.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-unwrap-take
|
|
|
|
~/ %ap-unwrap-take
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term pax=path =cage]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm [term p.cage pax])
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?~ maybe-arm
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "{(trip term)}: no {<`path`[p.cage pax]>}")
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-lame term tang)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =vase
|
|
|
|
%- slop
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(0 p.arm)
|
|
|
|
=/ =vase (ap-cage cage)
|
|
|
|
[!>(`path`pax) vase]
|
|
|
|
[!>((slag (dec p.arm) `path`pax)) q.cage]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-specific-take: specific take.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-specific-take
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =internal-gift]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=/ pax +.path
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.internal-gift
|
2019-08-14 14:57:51 +03:00
|
|
|
%coup
|
|
|
|
=/ maybe-vase (some !>(p.internal-gift))
|
|
|
|
(ap-non-diff-take %coup pax maybe-vase)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
%diff
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =ship attributing.agent-routes
|
2019-08-14 14:57:51 +03:00
|
|
|
=/ =cage p.internal-gift
|
|
|
|
(ap-diff ship path cage)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
%quit
|
|
|
|
(ap-non-diff-take %quit pax ~)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
%reap
|
|
|
|
=/ maybe-vase (some !>(p.internal-gift))
|
|
|
|
(ap-non-diff-take %reap pax maybe-vase)
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
%http-response
|
|
|
|
!!
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-install: install wrapper.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-install
|
2019-05-06 05:17:46 +03:00
|
|
|
|= maybe-vase=(unit vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(unit tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-prep maybe-vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new-misvale-data
|
2019-07-03 05:36:54 +03:00
|
|
|
~? !=(misvale.current-agent *misvale-data)
|
|
|
|
[%misvale-drop misvale.current-agent]
|
2019-05-06 05:17:46 +03:00
|
|
|
:: new app might mean new marks
|
|
|
|
*misvale-data
|
2018-11-25 01:20:22 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ new-agent-config
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =term ?~(maybe-vase %boot %bump)
|
|
|
|
=/ possibly-suss
|
|
|
|
?~ maybe-tang
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ =suss [agent-name term now]
|
2019-05-06 05:17:46 +03:00
|
|
|
[%.y suss]
|
|
|
|
[%.n u.maybe-tang]
|
2019-06-02 09:57:06 +03:00
|
|
|
[possibly-suss agent-config]
|
2016-11-08 03:41:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ next
|
2019-08-16 02:00:27 +03:00
|
|
|
%= ap-core
|
2019-08-14 14:57:51 +03:00
|
|
|
misvale.current-agent new-misvale-data
|
|
|
|
agent-config new-agent-config
|
|
|
|
arm-cache.current-agent ~
|
2019-05-06 05:17:46 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
[maybe-tang next]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-prep: low-level install.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-prep
|
|
|
|
~/ %ap-prep
|
2019-05-06 05:17:46 +03:00
|
|
|
|= maybe-vase=(unit vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(unit tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
?. (ap-exists-arm %prep)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-vase
|
2019-08-16 02:00:27 +03:00
|
|
|
[~ ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ new-type
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ new (slot 13 running-state.current-agent)
|
2019-05-13 10:40:50 +03:00
|
|
|
p.new
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ old-type
|
|
|
|
=/ old (slot 13 u.maybe-vase)
|
|
|
|
p.old
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?. (~(nest ut new-type) %.n old-type)
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "prep mismatch")
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some tang) ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=/ next
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core(+13.q.running-state.current-agent +13.q.u.maybe-vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
[~ next]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =vase
|
|
|
|
?~ maybe-vase
|
|
|
|
!>(~)
|
|
|
|
(slop !>(~) (slot 13 u.maybe-vase))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(ap-call %prep vase)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-silent-delete: silent delete.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-silent-delete
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=. incoming.subcribers.current-agent
|
|
|
|
(~(del by incoming.subscribers.current-agent) agent-bone)
|
|
|
|
ap-core
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-load-delete: load delete.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-load-delete
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-14 14:57:51 +03:00
|
|
|
=/ maybe-incoming
|
|
|
|
(~(get by incoming.subscribers.current-agent) agent-bone)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-incoming
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming u.maybe-incoming
|
2019-08-14 14:57:51 +03:00
|
|
|
=. incoming.subscribers.current-agent
|
|
|
|
(~(del by incoming.subscribers.current-agent) agent-bone)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm %pull q.incoming)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>((slag p.arm q.incoming))
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-kill: queue kill.
|
|
|
|
::
|
|
|
|
++ ap-kill
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
2019-06-02 09:27:59 +03:00
|
|
|
=> ap-load-delete
|
|
|
|
(ap-give %quit ~)
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-non-diff-take: non-diff gall take.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-non-diff-take
|
|
|
|
~/ %ap-non-diff-take
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term =path maybe-vase=(unit vase)]
|
2019-08-16 02:00:27 +03:00
|
|
|
^+ ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-arm ap-core (ap-find-arm term path)
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase
|
|
|
|
=/ vax !>((slag p.arm path))
|
|
|
|
?~ maybe-vase
|
|
|
|
vax
|
|
|
|
(slop vax u.maybe-vase)
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ maybe-tang ap-core (ap-call q.arm vase)
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-08-16 02:00:27 +03:00
|
|
|
ap-core
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-safe: process move list.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-safe
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-safe
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each (list internal-move) tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?~ q.vase
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.y ~] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?@ q.vase
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "move: malformed list")
|
2019-08-16 02:00:27 +03:00
|
|
|
[[%.n tang] ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ hed cache.current-agent (~(slot wa cache.current-agent) 2 vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-internal-move ap-core (ap-move hed)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-internal-move)
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-internal-move ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move p.possibly-internal-move
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ tel cache.current-agent (~(slot wa cache.current-agent) 3 vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ res ap-core $(vase tel)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-internal-moves
|
2019-05-03 01:53:27 +03:00
|
|
|
?: ?=(%.n -.res)
|
|
|
|
res
|
2019-05-06 05:17:46 +03:00
|
|
|
[%.y [internal-move p.res]]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-internal-moves ap-core]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-handle-result: handle result.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-handle-result
|
|
|
|
~/ %ap-handle-result
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(unit tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?: ?=(@ q.vase)
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "ap-handle-result: invalid product (atom)")
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some tang) ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ hed cache.current-agent (~(slot wa cache.current-agent) 2 vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-internal-moves ap-core (ap-safe hed)
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-internal-moves)
|
|
|
|
=/ =tang p.possibly-internal-moves
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some tang) ap-core]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves p.possibly-internal-moves
|
2019-07-03 05:36:54 +03:00
|
|
|
=^ tel cache.current-agent (~(slot wa cache.current-agent) 3 vase)
|
2019-08-16 02:00:27 +03:00
|
|
|
=^ possibly-vase ap-core (ap-verify-core tel)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-vase)
|
|
|
|
=/ =tang p.possibly-vase
|
2019-08-16 02:00:27 +03:00
|
|
|
[(some tang) ap-core]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ next
|
2019-08-16 02:00:27 +03:00
|
|
|
%_ ap-core
|
2019-08-14 14:57:51 +03:00
|
|
|
agent-moves (weld (flop internal-moves) agent-moves)
|
2019-07-03 05:36:54 +03:00
|
|
|
running-state.current-agent p.possibly-vase
|
2019-05-06 05:17:46 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
[~ next]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-verify-core: verify core.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-verify-core
|
|
|
|
~/ %ap-verify-core
|
2019-04-27 08:42:04 +03:00
|
|
|
|= vax=vase
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each vase tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ received-type p.vax
|
2019-07-03 05:36:54 +03:00
|
|
|
=/ running-type p.running-state.current-agent
|
2019-08-14 14:57:51 +03:00
|
|
|
=^ nests cache.current-agent
|
|
|
|
(~(nest wa cache.current-agent) running-type received-type)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ possibly-vase
|
|
|
|
?. nests
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "invalid core")
|
2019-05-06 05:17:46 +03:00
|
|
|
[%.n tang]
|
|
|
|
[%.y vax]
|
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
[possibly-vase ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-slam: virtual slam.
|
|
|
|
::
|
|
|
|
++ ap-slam
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-slam
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term gat=vase arg=vase]
|
2019-08-16 02:00:27 +03:00
|
|
|
^- [(each vase tang) _ap-core]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ compiled
|
|
|
|
=/ =type [%cell p.gat p.arg]
|
|
|
|
=/ =hoon [%cnsg [%$ ~] [%$ 2] [%$ 3] ~]
|
2019-07-03 05:36:54 +03:00
|
|
|
(~(mint wa cache.current-agent) type hoon)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ virtual
|
|
|
|
=/ trap |.(compiled)
|
|
|
|
(mule trap)
|
|
|
|
::
|
|
|
|
?: ?=(%.n -.virtual)
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =tang (ap-tang "call: {<term>}: type mismatch")
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ sam (~(peek ut p.gat) %free 6)
|
|
|
|
=/ print
|
|
|
|
(slog >%ap-slam-mismatch< ~(duck ut p.arg) ~(duck ut sam) ~)
|
2019-08-16 02:00:27 +03:00
|
|
|
(print [[%.n tang] ap-core])
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ =worm +>.virtual
|
|
|
|
=/ =vase +<.virtual
|
|
|
|
=/ =type p.vase
|
|
|
|
=/ nock q.vase
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ ton (mock [[q.gat q.arg] nock] ap-namespace-view)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-vase
|
|
|
|
?- -.ton
|
|
|
|
%0 [%.y type p.ton]
|
|
|
|
%1 [%.n (turn p.ton |=(a=* (smyt (path a))))]
|
|
|
|
%2 [%.n p.ton]
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-16 02:00:27 +03:00
|
|
|
=/ next ap-core(cache.current-agent worm)
|
2019-05-06 05:17:46 +03:00
|
|
|
[possibly-vase next]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-namespace-view: namespace view.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-namespace-view (sloy ska)
|
|
|
|
:: +ap-tang: standard tang.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-tang
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =tape
|
2016-11-24 07:25:07 +03:00
|
|
|
^- tang
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ =tank [%leaf (weld "gall: {<agent-name>}: " tape)]
|
2019-05-03 01:53:27 +03:00
|
|
|
[tank ~]
|
2019-05-13 10:40:50 +03:00
|
|
|
:: +ap-atomic-vase: atomic vase.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
++ ap-atomic-vase
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =atom]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- vase
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =type [%atom term (some atom)]
|
2019-05-13 10:40:50 +03:00
|
|
|
[type atom]
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-vain: card to vane.
|
|
|
|
::
|
|
|
|
++ ap-vain
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit @tas)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?+ term ~& [%ap-vain term]
|
2019-05-06 05:17:46 +03:00
|
|
|
~
|
2019-08-15 23:52:44 +03:00
|
|
|
%bonk `%a
|
|
|
|
%build `%f
|
|
|
|
%cash `%a
|
|
|
|
%conf `%g
|
|
|
|
%cred `%c
|
|
|
|
%crew `%c
|
|
|
|
%crow `%c
|
|
|
|
%deal `%g
|
|
|
|
%dirk `%c
|
|
|
|
%drop `%c
|
|
|
|
%flog `%d
|
|
|
|
%info `%c
|
|
|
|
%keep `%f
|
|
|
|
%kill `%f
|
2019-09-27 20:55:14 +03:00
|
|
|
%knob `%d
|
2019-08-15 23:52:44 +03:00
|
|
|
%look `%j
|
|
|
|
%listen `%j
|
|
|
|
%merg `%c
|
|
|
|
%mont `%c
|
|
|
|
%moon `%j
|
|
|
|
%nuke `%a
|
|
|
|
%ogre `%c
|
|
|
|
%perm `%c
|
|
|
|
%rest `%b
|
|
|
|
%rekey `%j
|
|
|
|
%wait `%b
|
2019-10-30 23:12:57 +03:00
|
|
|
%plea `%a
|
2019-08-15 23:52:44 +03:00
|
|
|
%warp `%c
|
|
|
|
%wash `%g
|
|
|
|
%wipe `%f
|
2019-07-04 03:08:23 +03:00
|
|
|
%request `%i
|
|
|
|
%cancel-request `%i
|
2019-08-14 14:57:51 +03:00
|
|
|
%serve `%e
|
|
|
|
%connect `%e
|
|
|
|
%disconnect `%e
|
|
|
|
%rule `%e
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
--
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +call: request
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
++ call
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-call +> ~
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=duct hic=(hypo (hobo task:able))]
|
|
|
|
^- [(list move) _gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
~| [%gall-call-failed duct q.hic]
|
|
|
|
:: make sure our task is hard
|
2019-08-15 23:52:44 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =task:able
|
|
|
|
?. ?=(%soft -.q.hic)
|
|
|
|
q.hic
|
|
|
|
;; task:able p.q.hic
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ initialised (mo-abed:mo duct)
|
2019-05-13 10:40:50 +03:00
|
|
|
?- -.task
|
2019-04-11 23:34:30 +03:00
|
|
|
%conf
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =dock p.task
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =ship p.dock
|
|
|
|
?. =(our ship)
|
|
|
|
~& [%gall-not-ours ship]
|
|
|
|
[~ gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
=> (mo-boot:initialised q.dock q.task)
|
|
|
|
mo-abet
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:34:30 +03:00
|
|
|
%deal
|
2019-05-13 10:40:50 +03:00
|
|
|
=/ =sock p.task
|
|
|
|
=/ =internal-task q.task
|
|
|
|
?. =(q.sock our)
|
|
|
|
?> =(p.sock our)
|
2019-10-30 23:12:57 +03:00
|
|
|
=> (mo-send-foreign-request:initialised q.sock internal-task)
|
2019-05-13 10:40:50 +03:00
|
|
|
mo-abet
|
|
|
|
::
|
|
|
|
=> (mo-handle-local:initialised p.sock internal-task)
|
|
|
|
mo-abet
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-04-11 23:34:30 +03:00
|
|
|
%init
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ payload gall-payload(system-duct.agents.state duct)
|
2019-05-05 03:23:22 +03:00
|
|
|
[~ payload]
|
2019-09-27 23:00:37 +03:00
|
|
|
::
|
|
|
|
%trim
|
2019-10-01 22:26:56 +03:00
|
|
|
:: reuse %wash task to clear caches on memory-pressure
|
|
|
|
::
|
|
|
|
:: XX cancel subscriptions if =(0 trim-priority) ?
|
|
|
|
::
|
|
|
|
~> %slog.[0 leaf+"gall: trim: clearing caches"]
|
|
|
|
=/ =move [duct %pass / %g [%wash ~]]
|
|
|
|
[[move ~] gall-payload]
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
%vega
|
|
|
|
[~ gall-payload]
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
%plea
|
|
|
|
=/ =ship ship.task
|
|
|
|
=/ =path path.task
|
|
|
|
=/ =noun payload.task
|
2019-05-13 10:40:50 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
~| [ship=ship plea-path=path]
|
|
|
|
?> ?=([%ge @ ~] path)
|
2019-06-02 09:57:06 +03:00
|
|
|
=/ agent-name i.t.path
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
=/ =ames-request ;;(ames-request noun)
|
|
|
|
=> (mo-handle-ames-request ship agent-name ames-request)
|
2019-05-13 10:40:50 +03:00
|
|
|
mo-abet
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-08-11 00:24:31 +03:00
|
|
|
%wash
|
2019-08-15 19:14:09 +03:00
|
|
|
=. running.agents.state
|
|
|
|
(~(run by running.agents.state) |=(=agent agent(cache *worm)))
|
2019-05-06 05:17:46 +03:00
|
|
|
[~ gall-payload]
|
2019-08-15 23:19:49 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
%wegh
|
2019-06-26 00:25:03 +03:00
|
|
|
=/ blocked
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ queued (~(run by blocked.agents.state) |=(blocked [%.y +<]))
|
2019-05-06 05:17:46 +03:00
|
|
|
(sort ~(tap by queued) aor)
|
|
|
|
::
|
|
|
|
=/ running
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ active (~(run by running.agents.state) |=(agent [%.y +<]))
|
2019-05-06 05:17:46 +03:00
|
|
|
(sort ~(tap by active) aor)
|
|
|
|
::
|
2018-12-13 04:34:25 +03:00
|
|
|
=/ =mass
|
2019-05-03 01:53:27 +03:00
|
|
|
:+ %gall %.n
|
2019-08-15 19:14:09 +03:00
|
|
|
:~ [%foreign %.y contacts.agents.state]
|
2019-06-26 00:25:03 +03:00
|
|
|
[%blocked %.n blocked]
|
2019-05-06 05:17:46 +03:00
|
|
|
[%active %.n running]
|
2019-08-15 19:14:09 +03:00
|
|
|
[%dot %.y state]
|
2018-12-13 04:34:25 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-10-30 23:12:57 +03:00
|
|
|
[[duct %give %mass mass]~ gall-payload]
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +load: recreate vane
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
++ load
|
2019-08-15 19:14:09 +03:00
|
|
|
|= =state-old
|
2019-05-03 01:53:27 +03:00
|
|
|
^+ gall-payload
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
?- -.state-old
|
|
|
|
%0 gall-payload(state state-old)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +scry: standard scry
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ scry
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %gall-scry
|
2019-05-05 03:23:22 +03:00
|
|
|
|= [fur=(unit (set monk)) =term =shop =desk =coin =path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-05-05 03:23:22 +03:00
|
|
|
?. ?=(%.y -.shop)
|
2019-05-03 01:53:27 +03:00
|
|
|
~
|
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ =ship p.shop
|
|
|
|
?: ?& =(%u term)
|
|
|
|
=(~ path)
|
|
|
|
=([%$ %da now] coin)
|
|
|
|
=(our ship)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-08-15 19:14:09 +03:00
|
|
|
=/ =vase !>((~(has by running.agents.state) desk))
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ =cage [%noun vase]
|
|
|
|
(some (some cage))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. =(our ship)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. =([%$ %da now] coin)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
?. (~(has by running.agents.state) desk)
|
2019-05-05 03:23:22 +03:00
|
|
|
(some ~)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. ?=(^ path)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ initialised mo-abed:mo
|
2019-08-15 20:40:03 +03:00
|
|
|
=/ =routes [~ ship]
|
|
|
|
(mo-peek:initialised desk routes term path)
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +stay: save without cache
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-08-15 19:14:09 +03:00
|
|
|
++ stay state
|
2019-08-15 19:18:31 +03:00
|
|
|
:: +take: response
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
++ take
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %gall-take
|
2019-05-05 03:23:22 +03:00
|
|
|
|= [=wire =duct hin=(hypo sign-arvo)]
|
|
|
|
^- [(list move) _gall-payload]
|
|
|
|
::
|
2019-05-13 10:40:50 +03:00
|
|
|
~| [%gall-take-failed wire]
|
2019-10-30 23:12:57 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?> ?=([?(%sys %use) *] wire)
|
|
|
|
=/ initialised (mo-abed:mo duct)
|
2019-05-29 10:46:55 +03:00
|
|
|
=/ =sign-arvo q.hin
|
2019-05-06 05:17:46 +03:00
|
|
|
=>
|
2019-05-05 03:23:22 +03:00
|
|
|
?- i.wire
|
2019-05-29 10:46:55 +03:00
|
|
|
%sys (mo-handle-sys:initialised t.wire sign-arvo)
|
2019-05-13 10:40:50 +03:00
|
|
|
%use (mo-handle-use:initialised t.wire hin)
|
2016-11-04 21:19:02 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
mo-abet
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|