You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/Protocol Specifications/core.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,8 @@ appearing on ID-Certs managed by that server **if all the following conditions a
184
184
the domain components of the *visible domain name*, the server hosted under the *actual domain name*
185
185
must not be treated as a polyproto server for the *visible domain name*.
186
186
187
+
Every polyproto home server must have a `.well-known` URI, accessible via an HTTP GET request.
188
+
187
189
Should a client not be able to access the polyproto API endpoints located at `[visible domain name]/.p2/core/`,
188
190
the client must query `[visible domain name]/.well-known/polyproto-core` with an HTTP GET request and
189
191
try to verify the above-mentioned conditions. If all the above-mentioned conditions can be fulfilled,
@@ -386,7 +388,8 @@ A service channel event payload has the following structure:
386
388
|`service`| string | The name of a polyproto service. |
387
389
388
390
The server must respond with a `Service Channel ACK` event payload, indicating whether the action
389
-
was successful or not.
391
+
was successful or not. Clients should expect that the server sends a `Service Channel` payload indicating
392
+
the closing of a channel.
390
393
391
394
!!! example "Example service channel ACK event payload - failure"
392
395
@@ -398,7 +401,7 @@ was successful or not.
398
401
"action": "subscribe",
399
402
"service": "service_name",
400
403
"success": false,
401
-
"errorMessage": "Service not found"
404
+
"error": "Service not found"
402
405
},
403
406
"s": 1
404
407
}
@@ -424,7 +427,7 @@ was successful or not.
424
427
|`action`| string | The action to perform on the service channel. Must be either `subscribe` or `unsubscribe`. |
425
428
|`service`| string | The polyproto service that was specified in the opcode 8 request |
426
429
|`success`| boolean | Whether the action was successful or not. |
427
-
|`message`| string? | Only present if `success` is `false`. A message indicating why the action failed. |
430
+
|`error`| string? | Only present if `success` is `false`. A message indicating why the action failed. |
428
431
429
432
If a successful subscription to a service channel is acknowledged, all logic and further event on
430
433
this channel are defined by the service's specification.
@@ -675,8 +678,8 @@ A heartbeat ACK contains events that the client has re-requested as part of thei
675
678
}
676
679
```
677
680
678
-
As such, the field `d` in a heartbeat ack is optional (`?`) and, if present, contains an array of
679
-
other gateway events. Heartbeat ACK payloads must not be present in this array, making recursion
681
+
As such, the field `d` in a heartbeat ack may be empty, but never not present. The `d` field contains
682
+
an array of other gateway events. Heartbeat ACK payloads must not be present in this array, making recursion
680
683
impossible.
681
684
682
685
#### 3.2.4 Establishing a connection
@@ -993,7 +996,7 @@ FIDs consist of the following parts:
993
996
|`@`| <aname="def-separator"id="separator"></a>"Separator" | Separates local name from domain name |
994
997
|`optionalsubdomain.domain.tld`| <aname="def-domain-name"id="def-domain-name"></a>"Domain Name" | Includes top-level domain, second-level domain and other subdomains. Address which the actors' home server can be reached at. |
995
998
996
-
The following regular expression can be used to validate actor IDs: `\b([a-z0-9._%+-]+)@([a-z0-9-]+(\.[a-z0-9-]+)*)`.
999
+
The following regular expression can be used to validate actor IDs: `\b([a-z0-9._%+-]+)@([a-z0-9-]+(\.[a-z0-9-]+)*)$`.
0 commit comments