@kubun/plugin-p2p-api 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +10 -11
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ export type WorkflowDiscoverReply = {
|
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* The narrow typed P2P control-plane API. Each method takes `groupID` as the
|
|
16
|
-
* PEER-SELECTION argument; the transport (
|
|
17
|
-
* directed `.to(targetDID)` request for
|
|
16
|
+
* PEER-SELECTION argument; the transport (one gather through the group's
|
|
17
|
+
* designated commit hub for discover, a directed `.to(targetDID)` request for
|
|
18
|
+
* the rest) and reply dedup (by
|
|
18
19
|
* authenticated `senderDID`) are the implementation's concern — no
|
|
19
20
|
* group-peer-manager internal is exposed here.
|
|
20
21
|
*
|
|
@@ -26,21 +27,19 @@ export type WorkflowDiscoverReply = {
|
|
|
26
27
|
* refusal into a local throw.
|
|
27
28
|
*/
|
|
28
29
|
/**
|
|
29
|
-
* Bounds
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* window
|
|
34
|
-
*
|
|
35
|
-
* window even once the combined result already holds `quorum` distinct
|
|
36
|
-
* responders; the single-hub case (the common one) resolves exactly at quorum.
|
|
30
|
+
* Bounds the discover gather, mirroring `peer/query`: discover is one
|
|
31
|
+
* `workflow/discover` gather through the group's designated commit hub, so
|
|
32
|
+
* `quorum` resolves it as soon as that many distinct responders answer (set it
|
|
33
|
+
* to the known live-member count to return promptly rather than waiting out the
|
|
34
|
+
* window), and `timeoutMs` caps the wait. Both optional; absent, the gather runs
|
|
35
|
+
* its default window.
|
|
37
36
|
*/
|
|
38
37
|
export type WorkflowDiscoverOptions = {
|
|
39
38
|
quorum?: number;
|
|
40
39
|
timeoutMs?: number;
|
|
41
40
|
};
|
|
42
41
|
export type WorkflowControlPlaneAPI = {
|
|
43
|
-
/**
|
|
42
|
+
/** Gather `workflow/discover` through the designated hub; one entry per distinct responder. */
|
|
44
43
|
discoverWorkflows(groupID: string, options?: WorkflowDiscoverOptions): Promise<Array<WorkflowDiscoverReply>>;
|
|
45
44
|
/** Directed `workflow/list` to one peer: its remotely-observable instances. */
|
|
46
45
|
listWorkflows(groupID: string, targetDID: string): Promise<Array<InstanceStatus>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/plugin-p2p-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"license": "see LICENSE.md",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"LICENSE.md"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@kubun/plugin-workflow-api": "^0.
|
|
18
|
+
"@kubun/plugin-workflow-api": "^0.18.0"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|