2021-05-27 08:36:35 +00:00
|
|
|
version 1 .
|
2021-07-22 12:12:53 +00:00
|
|
|
embeddedType EntityRef.Cap .
|
2021-05-27 08:36:35 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Protocol at *gatekeeper* entities
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# Assertion. Gatekeeper will attempt to resolve `step`, responding with a `Resolved` to
|
|
|
|
# `observer`.
|
2023-02-08 21:11:45 +00:00
|
|
|
Resolve = <resolve @step Step @observer #!Resolved> .
|
2023-02-08 13:33:48 +00:00
|
|
|
Resolved = <accepted @responderSession #!any> / Rejected .
|
2023-02-08 22:04:42 +00:00
|
|
|
Step = <<rec> @stepType symbol [@detail any]> .
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Protocol at dataspaces *associated* with gatekeeper entities
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# Assertion. Gatekeeper will compute an appropriate PathStep from `description` pointing at
|
|
|
|
# `target`, and will respond with a `Bound` to `observer` (if supplied).
|
2023-02-08 21:11:45 +00:00
|
|
|
Bind = <bind @description Description @target #!any @observer BindObserver> .
|
2023-02-08 22:04:42 +00:00
|
|
|
Description = <<rec> @stepType symbol [@detail any]> .
|
2023-02-08 13:33:48 +00:00
|
|
|
BindObserver = @present #!Bound / @absent #f .
|
2023-02-08 22:43:51 +00:00
|
|
|
Bound = <bound @pathStep PathStep> / Rejected .
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Protocol at client-side dataspaces, for resolution utilities
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# Assertion. In response to observation of this with appropriate captures/wildcards in `addr`
|
|
|
|
# and `resolved`, respondent will follow `route.pathSteps` starting from one of the
|
|
|
|
# `route.transports`, asserting `ResolvePath` with the final `Resolved` as well as the selected
|
|
|
|
# transport `addr` and a `control` for it.
|
2023-02-08 13:33:48 +00:00
|
|
|
ResolvePath = <resolve-path @route Route @addr any @control #!TransportControl @resolved Resolved> .
|
2023-02-08 19:36:14 +00:00
|
|
|
|
|
|
|
TransportConnection = <connect-transport @addr any @control #!TransportControl @resolved Resolved> .
|
2023-02-08 21:11:45 +00:00
|
|
|
ResolvedPathStep = <path-step @origin #!Resolve @pathStep PathStep @resolved Resolved> .
|
2023-02-08 22:04:42 +00:00
|
|
|
PathStep = <<rec> @stepType symbol [@detail any]> .
|
2023-02-08 13:33:48 +00:00
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# A `Route` describes a network path that can be followed to reach some target entity.
|
|
|
|
#
|
|
|
|
# It starts with a set of zero or more possible non-Syndicate `transports`. These could be
|
|
|
|
# `transportAddress.Tcp` values or similar. They are just suggestions; it's quite possible the
|
|
|
|
# endpoint is reachable by some means not listed. The network outside Syndicate is, after all,
|
|
|
|
# pretty diverse! In particular, *zero* `transports` may be provided, in which case some
|
|
|
|
# out-of-band means has to be used to make that first connection.
|
|
|
|
#
|
|
|
|
# The `transports` give instructions for contacting the first entity in the `Route` path. Often
|
|
|
|
# this will be a `gatekeeper`, or a `noise` protocol endpoint, or both. Occasionally, it may
|
|
|
|
# even be the desired target entity. Subsequent `pathSteps` describe how to proceed from the
|
|
|
|
# initial entity to the target.
|
|
|
|
#
|
|
|
|
# (`transports` should by rights be a set, not a sequence, but that opens up a Can Of Worms
|
|
|
|
# regarding dataspace patterns including literal sets that I can't deal with right now.)
|
2023-02-11 20:49:49 +00:00
|
|
|
Route = <route @transports [any ...] @pathSteps PathStep ...> .
|
2023-02-08 13:33:48 +00:00
|
|
|
|
|
|
|
TransportControl = ForceDisconnect .
|
|
|
|
ForceDisconnect = <force-disconnect> .
|
|
|
|
|
2023-10-31 20:56:44 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2023-02-08 21:11:45 +00:00
|
|
|
|
2023-02-08 13:33:48 +00:00
|
|
|
Rejected = <rejected @detail any> .
|