@moltzap/client 2026.1001.2 → 2026.1002.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/README.md +9 -4
- package/dist/contract.d.ts +41 -41
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +48 -58
- package/dist/contract.js.map +1 -1
- package/dist/contract.types-check.d.ts +14 -15
- package/dist/contract.types-check.d.ts.map +1 -1
- package/dist/contract.types-check.js +3 -1
- package/dist/contract.types-check.js.map +1 -1
- package/dist/daemon/runtime/controller.d.ts.map +1 -1
- package/dist/daemon/runtime/controller.js +1 -3
- package/dist/daemon/runtime/controller.js.map +1 -1
- package/dist/endpoint/collective/operation.d.ts +13 -10
- package/dist/endpoint/collective/operation.d.ts.map +1 -1
- package/dist/endpoint/collective/operation.js +121 -101
- package/dist/endpoint/collective/operation.js.map +1 -1
- package/dist/endpoint/collective/received-request.d.ts +40 -0
- package/dist/endpoint/collective/received-request.d.ts.map +1 -0
- package/dist/endpoint/collective/received-request.js +56 -0
- package/dist/endpoint/collective/received-request.js.map +1 -0
- package/dist/endpoint/collective/request-sends.d.ts +41 -0
- package/dist/endpoint/collective/request-sends.d.ts.map +1 -0
- package/dist/endpoint/collective/request-sends.js +46 -0
- package/dist/endpoint/collective/request-sends.js.map +1 -0
- package/dist/endpoint/collective/validation.d.ts.map +1 -1
- package/dist/endpoint/collective/validation.js +0 -2
- package/dist/endpoint/collective/validation.js.map +1 -1
- package/dist/endpoint/collective/wire.d.ts +4 -4
- package/dist/endpoint/collective/wire.d.ts.map +1 -1
- package/dist/endpoint/collective/wire.js +74 -5
- package/dist/endpoint/collective/wire.js.map +1 -1
- package/dist/harness-mcp-contract.d.ts +3 -6
- package/dist/harness-mcp-contract.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/message-text.d.ts +51 -0
- package/dist/message-text.d.ts.map +1 -0
- package/dist/message-text.js +120 -0
- package/dist/message-text.js.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.types-check.d.ts","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contract.types-check.d.ts","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtE,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,OAAO,EACP,WAAW,EACX,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,KAAK,KAAK,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAC7E,KAAK,MAAM,CAAC,KAAK,SAAS,IAAI,IAAI,KAAK,CAAC;AAExC,KAAK,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1C,KAAK,uBAAuB,GAAG,QAAQ,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,QAAQ,C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K,CACH,YAAY,CAAC,QAAQ,CAAC,EACtB,kBAAkB,GAAG,eAAe,GAAG,qBAAqB,CAC7D,CACF,CAAC;AACF,KAAK,mBAAmB,GAAG,MAAM,CAC/B,KAAK,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAClE,CAAC;AACF,KAAK,wBAAwB,GAAG,MAAM,CACpC,KAAK,CACH,UAAU,CAAC,OAAO,sBAAsB,CAAC,EACzC,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAC1D,CACF,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB;IAChB,wBAAwB;IACxB,iBAAiB;IACjB,sBAAsB;IACtB,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,8BAA8B;IAC9B,0BAA0B;IAC1B,qBAAqB;IACrB,0BAA0B;IAC1B,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;CACzB,CAAC"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* operations or collective responses and whose inbound deliveries are tagged
|
|
4
4
|
* items. An operation carries an address, text and an optional collective
|
|
5
5
|
* operation, multicast by default or a gather or all_gather with its deadline
|
|
6
|
-
* and schema; a response names
|
|
6
|
+
* and schema; a response names the conversation whose open request it
|
|
7
|
+
* answers and no request id. One parser reads either from a message's text,
|
|
8
|
+
* so every adapter accepts the same text. Each inbound
|
|
7
9
|
* delivery carries one item plus transport-only acknowledgment: a multicast
|
|
8
10
|
* with the certified direct or complete-group message, a collective request
|
|
9
11
|
* naming the conversation it arrived in, a collective result that names an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.types-check.js","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contract.types-check.js","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/daemon/runtime/controller.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAG7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAsB,MAAM,EAAS,KAAK,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAO7D,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,kBAAkB,EAGnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAML,KAAK,0BAA0B,EAChC,MAAM,eAAe,CAAC;AAEvB,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;CAClD;AAED,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,O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AQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;CAClD;AAED,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,cAAc,EAAE,CACvB,OAAO,EAAE,0BAA0B,KAChC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IACpE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAChE,QAAQ,CAAC,iBAAiB,EAAE,CAC1B,KAAK,EAAE,2BAA2B,CAAC,cAAc,CAAC,KAC/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;CAC9C;AAoMD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UACxB,qBAAqB,KAC3B,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAsCvB,CAAC"}
|
|
@@ -39,9 +39,7 @@ const makeSendOperation = (environment) => (request) => Effect.suspend(() => {
|
|
|
39
39
|
kind: "sent",
|
|
40
40
|
...outcome,
|
|
41
41
|
}),
|
|
42
|
-
}), Effect.map((
|
|
43
|
-
? {}
|
|
44
|
-
: { operationId: outcome.operationId }));
|
|
42
|
+
}), Effect.map(({ operationId }) => operationId === undefined ? {} : { operationId }));
|
|
45
43
|
});
|
|
46
44
|
const forgetDelivery = (state, deliveryToken) => Effect.sync(() => {
|
|
47
45
|
state.publishedDeliveries.delete(deliveryToken);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/daemon/runtime/controller.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAG7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAKlE,OAAO,EACL,wBAAwB,EAExB,SAAS,GAEV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAGlB,sBAAsB,GAEvB,MAAM,eAAe,CAAC;AAwBvB,MAAM,cAAc,GAAG,CACrB,KAAkC,EACd,EAAE,CAAC,IAAI,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAE3D,MAAM,wBAAwB,GAAG,CAC/B,KAA4B,EACR,EAAE,CACtB,cAAc,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAEvE,MAAM,qBAAqB,GACzB,CACE,WAAgC,EAChC,UAAqD,EACrD,UAA8B,EACI,EAAE,CACtC,CAAC,OAAO,EAAE,EAAE,CACV,MAAM,CAAC,eAAe,CACpB,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAC/B,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CACxB,kBAAkB,CAChB;IACE,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,SAAS,EAAE,WAAW,CAAC,SAAS;IAChC,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,UAAU;CACX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,GAAkB;QAC3B,kBAAkB,EAAE,KAAK;QACzB,mBAAmB,EAAE,IAAI,GAAG,EAAE;QAC9B,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,kBAAkB,EAAE,IAAI,GAAG,EAAE;QAC7B,eAAe,EAAE,IAAI,GAAG,EAAE;KAC3B,CAAC;IACF,MAAM,WAAW,GAAwB;QACvC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,QAAQ;QACR,MAAM;QACN,WAAW;QACX,KAAK;QACL,KAAK;KACN,CAAC;IACF,MAAM,UAAU,GAAG,sBAAsB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,UAAU,GAAG,CAAC,SAA4B,EAAE,EAAE,CAClD,kBAAkB,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACzE,OAAO,wBAAwB,CAAC;QAC9B,WAAW;QACX,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,OAAO;QACP,YAAY;QACZ,UAAU;QACV,UAAU;KACX,CAAC,CAAC;AACL,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC"}
|
|
@@ -21,14 +21,15 @@
|
|
|
21
21
|
* RM->>RE: send gather to, question, deadline, schema
|
|
22
22
|
* RE->>RE: validate schema, mint id<br>deadline = now + duration
|
|
23
23
|
* RE->>ME: one request post per member
|
|
24
|
-
* alt
|
|
24
|
+
* alt no request post is accepted
|
|
25
25
|
* RE-->>RM: error naming each unreachable member
|
|
26
|
-
* else
|
|
26
|
+
* else some request post accepted
|
|
27
27
|
* RE-->>RM: operation id
|
|
28
|
+
* RE->>RE: record each refused or uncertified member as no-answer
|
|
28
29
|
* end
|
|
29
30
|
* ME->>MM: collectiveRequest item
|
|
30
|
-
* MM->>ME: send collectiveResponse
|
|
31
|
-
* ME->>ME: validate content against
|
|
31
|
+
* MM->>ME: send collectiveResponse to the requester, action, content
|
|
32
|
+
* ME->>ME: match the request open in that conversation<br>validate content against its schema
|
|
32
33
|
* ME->>RE: response post in the direct conversation
|
|
33
34
|
* RE->>RE: consume, validate and record the answer
|
|
34
35
|
* Note over RE: complete when every member has an outcome<br>or at the deadline
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
* RE-->>RM: operation id
|
|
55
56
|
* end
|
|
56
57
|
* ME->>MM: collectiveRequest item
|
|
57
|
-
* MM->>ME: send collectiveResponse
|
|
58
|
-
* ME->>ME: validate content against
|
|
58
|
+
* MM->>ME: send collectiveResponse to the group, action, content
|
|
59
|
+
* ME->>ME: match the request open in the group<br>validate content against its schema
|
|
59
60
|
* ME->>RE: response post to the group
|
|
60
61
|
* ME->>ME: peer response posts, consumed and recorded by record hash
|
|
61
62
|
* Note over RE: complete when every member has an outcome<br>or at the deadline
|
|
@@ -99,10 +100,12 @@ interface CollectiveSendOutcome extends SendResult {
|
|
|
99
100
|
/** The daemon's collective layer for one active identity. */
|
|
100
101
|
export interface CollectiveOperations {
|
|
101
102
|
/**
|
|
102
|
-
* Perform one send. A gather completes once
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
103
|
+
* Perform one send. A gather completes once its request posts are
|
|
104
|
+
* settled, recording each member it did not reach as no-answer, and
|
|
105
|
+
* fails naming every member only when it reached none; an all_gather
|
|
106
|
+
* completes once its group post is certified. A response answers the one
|
|
107
|
+
* request open in the conversation its address names, validated against
|
|
108
|
+
* that request's schema.
|
|
106
109
|
*/
|
|
107
110
|
readonly send: (input: SendInput, failureDelivery: FailureDelivery) => Effect.Effect<CollectiveSendOutcome, SendError | CollectiveError>;
|
|
108
111
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/endpoint/collective/operation.ts"],"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AACvE,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED,kFAAkF;AAClF,UAAU,qBAAsB,SAAQ,UAAU;IAChD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC3D;AAED,6DAA6D;AAC7D,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,CACb,KAAK,EAAE,SAAS,EAChB,eAAe,EAAE,eAAe,KAC7B,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,SAAS,GAAG,eAAe,CAAC,CAAC;IACvE;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,CACjB,IAAI,EAAE,aAAa,KAChB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;CAChD;AAmED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,UAC5B,eAAe,KACrB,oBAiBF,CAAC"}
|
|
@@ -21,14 +21,15 @@
|
|
|
21
21
|
* RM->>RE: send gather to, question, deadline, schema
|
|
22
22
|
* RE->>RE: validate schema, mint id<br>deadline = now + duration
|
|
23
23
|
* RE->>ME: one request post per member
|
|
24
|
-
* alt
|
|
24
|
+
* alt no request post is accepted
|
|
25
25
|
* RE-->>RM: error naming each unreachable member
|
|
26
|
-
* else
|
|
26
|
+
* else some request post accepted
|
|
27
27
|
* RE-->>RM: operation id
|
|
28
|
+
* RE->>RE: record each refused or uncertified member as no-answer
|
|
28
29
|
* end
|
|
29
30
|
* ME->>MM: collectiveRequest item
|
|
30
|
-
* MM->>ME: send collectiveResponse
|
|
31
|
-
* ME->>ME: validate content against
|
|
31
|
+
* MM->>ME: send collectiveResponse to the requester, action, content
|
|
32
|
+
* ME->>ME: match the request open in that conversation<br>validate content against its schema
|
|
32
33
|
* ME->>RE: response post in the direct conversation
|
|
33
34
|
* RE->>RE: consume, validate and record the answer
|
|
34
35
|
* Note over RE: complete when every member has an outcome<br>or at the deadline
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
* RE-->>RM: operation id
|
|
55
56
|
* end
|
|
56
57
|
* ME->>MM: collectiveRequest item
|
|
57
|
-
* MM->>ME: send collectiveResponse
|
|
58
|
-
* ME->>ME: validate content against
|
|
58
|
+
* MM->>ME: send collectiveResponse to the group, action, content
|
|
59
|
+
* ME->>ME: match the request open in the group<br>validate content against its schema
|
|
59
60
|
* ME->>RE: response post to the group
|
|
60
61
|
* ME->>ME: peer response posts, consumed and recorded by record hash
|
|
61
62
|
* Note over RE: complete when every member has an outcome<br>or at the deadline
|
|
@@ -65,10 +66,12 @@
|
|
|
65
66
|
* ME->>MM: collectiveResult item, the same outcomes
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
|
-
import { Clock, Duration, Effect, Array as EffectArray,
|
|
69
|
+
import { Clock, Duration, Effect, Array as EffectArray, Fiber, Option, ParseResult, Schema, } from "effect";
|
|
69
70
|
import { randomBytes } from "node:crypto";
|
|
70
71
|
import { AgentAddress, CollectiveError, MAXIMUM_DEADLINE_SECONDS, RequestedSchema, SendError, } from "../../contract.js";
|
|
71
72
|
import { canonicalMessageAddress } from "../addressing/index.js";
|
|
73
|
+
import { matchOpenRequest, } from "./received-request.js";
|
|
74
|
+
import { isAddressRefusal, lookupRefusals, requestsSoFar, } from "./request-sends.js";
|
|
72
75
|
import { keepFirstAnswer, listedAnswers, memberOutcomes, } from "./shared-answers.js";
|
|
73
76
|
import { outcomeOfResponse, validateAnswer } from "./validation.js";
|
|
74
77
|
import { collectiveIdOf, encodeCollectiveContent, FormModeSchema, readCollectiveValue, withoutCollectivePart, } from "./wire.js";
|
|
@@ -82,11 +85,6 @@ import { collectiveIdOf, encodeCollectiveContent, FormModeSchema, readCollective
|
|
|
82
85
|
* transport timeout.
|
|
83
86
|
*/
|
|
84
87
|
const REQUEST_SEND_WAIT = Duration.seconds(20);
|
|
85
|
-
/**
|
|
86
|
-
* How many Registry lookups a refused all_gather runs at once to name its
|
|
87
|
-
* unreachable members; they are independent, and a group has at most 32.
|
|
88
|
-
*/
|
|
89
|
-
const MEMBER_LOOKUP_CONCURRENCY = 8;
|
|
90
88
|
/**
|
|
91
89
|
* How long past its deadline a member keeps an all_gather request while it
|
|
92
90
|
* waits for the requester's close. The requester closes at the deadline at
|
|
@@ -130,7 +128,7 @@ export const makeCollectiveOperations = (ports) => {
|
|
|
130
128
|
};
|
|
131
129
|
return {
|
|
132
130
|
send: (input, failureDelivery) => "collectiveResponse" in input
|
|
133
|
-
? reportFailure(state, failureDelivery, respond(state, input.collectiveResponse))
|
|
131
|
+
? reportFailure(state, failureDelivery, respond(state, input.to, input.collectiveResponse))
|
|
134
132
|
: sendOperation(state, input, failureDelivery),
|
|
135
133
|
classify: (message) => classify(state, message),
|
|
136
134
|
};
|
|
@@ -209,17 +207,27 @@ function gatherAddress(to, self, op) {
|
|
|
209
207
|
: Effect.succeed({ to: canonical.address, members: [first, ...rest] });
|
|
210
208
|
}));
|
|
211
209
|
}
|
|
212
|
-
/**
|
|
210
|
+
/**
|
|
211
|
+
* Check a collecting operation's schema against the MCP form-mode grammar.
|
|
212
|
+
* The failure's detail is one line per issue, each led by its path within
|
|
213
|
+
* the schema, such as `properties.slots: items.type: ...`, because the
|
|
214
|
+
* requester's model repairs the form from this text alone.
|
|
215
|
+
*/
|
|
213
216
|
function formModeSchema(id, requestedSchema) {
|
|
214
217
|
return Schema.decodeUnknown(FormModeSchema)(requestedSchema).pipe(Effect.mapError((error) => collectiveFailure(id, {
|
|
215
218
|
kind: "schema-invalid",
|
|
216
|
-
detail: ParseResult.
|
|
219
|
+
detail: ParseResult.ArrayFormatter.formatErrorSync(error)
|
|
220
|
+
.map(({ path, message }) => path.length === 0
|
|
221
|
+
? message
|
|
222
|
+
: `${path.map(String).join(".")}: ${message}`)
|
|
223
|
+
.join("; "),
|
|
217
224
|
})));
|
|
218
225
|
}
|
|
219
226
|
/**
|
|
220
227
|
* Validate a gather or all_gather before any post: mint its id, check its
|
|
221
|
-
* schema against the form-mode grammar, name its members, fix
|
|
222
|
-
* deadline, and build the request content within the content
|
|
228
|
+
* schema against the form-mode grammar, name and resolve its members, fix
|
|
229
|
+
* its absolute deadline, and build the request content within the content
|
|
230
|
+
* limit.
|
|
223
231
|
*/
|
|
224
232
|
function prepareGather(state, requestedTo, question, operation) {
|
|
225
233
|
return Effect.gen(function* () {
|
|
@@ -227,6 +235,7 @@ function prepareGather(state, requestedTo, question, operation) {
|
|
|
227
235
|
const { to, members } = yield* gatherAddress(requestedTo, state.ports.self, operation.op).pipe(Effect.mapError(refusedAs(id, requestedTo)));
|
|
228
236
|
const refused = refusedAs(id, to);
|
|
229
237
|
const requestedSchema = yield* formModeSchema(id, operation.requestedSchema).pipe(Effect.mapError(refused));
|
|
238
|
+
yield* refuseAddressErrors(state, members).pipe(Effect.mapError((failure) => refused(collectiveFailure(id, failure))));
|
|
230
239
|
const now = yield* Clock.currentTimeMillis;
|
|
231
240
|
const untilDeadline = Duration.toMillis(Duration.seconds(operation.deadline));
|
|
232
241
|
const deadlineAt = now + untilDeadline;
|
|
@@ -259,15 +268,33 @@ function gather(state, requestedTo, question, operation) {
|
|
|
259
268
|
const prepared = yield* prepareGather(state, requestedTo, question, operation);
|
|
260
269
|
const timer = yield* sleepUntil(prepared.deadlineAt).pipe(Effect.zipRight(completeGather(state, prepared.id)), Effect.forkIn(state.ports.scope));
|
|
261
270
|
yield* Effect.sync(() => {
|
|
262
|
-
state.gathers.set(prepared.id, {
|
|
271
|
+
state.gathers.set(prepared.id, {
|
|
272
|
+
...prepared.open,
|
|
273
|
+
timer,
|
|
274
|
+
requestsSettled: prepared.open.op === "all_gather",
|
|
275
|
+
});
|
|
263
276
|
});
|
|
264
277
|
const requests = prepared.open.op === "gather"
|
|
265
278
|
? sendRequests(state, prepared)
|
|
266
|
-
: sendGroupRequest(state, prepared);
|
|
267
|
-
const
|
|
268
|
-
return { operationId: prepared.id
|
|
279
|
+
: sendGroupRequest(state, prepared).pipe(Effect.map((postIds) => ({ postIds })));
|
|
280
|
+
const sent = yield* requests.pipe(Effect.mapError(refusedAs(prepared.id, prepared.open.to)));
|
|
281
|
+
return { ...sent, operationId: prepared.id };
|
|
269
282
|
});
|
|
270
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Resolve every member before any post through the engine's address
|
|
286
|
+
* resolution. A malformed or unknown member, or invalid membership, refuses
|
|
287
|
+
* the whole send naming each one; any other lookup failure is left to the
|
|
288
|
+
* post, which reports it as a delivery failure.
|
|
289
|
+
*/
|
|
290
|
+
function refuseAddressErrors(state, members) {
|
|
291
|
+
return lookupRefusals(members, state.ports.lookupMember).pipe(Effect.map((refusals) => refusals.filter(isAddressRefusal)), Effect.flatMap(([first, ...rest]) => first === undefined
|
|
292
|
+
? Effect.void
|
|
293
|
+
: Effect.fail({
|
|
294
|
+
kind: "members-unreachable",
|
|
295
|
+
members: [first, ...rest],
|
|
296
|
+
})));
|
|
297
|
+
}
|
|
271
298
|
/** Sleep until the absolute time `at`, in steps no timer overflows. */
|
|
272
299
|
function sleepUntil(at) {
|
|
273
300
|
return Clock.currentTimeMillis.pipe(Effect.flatMap((now) => now >= at
|
|
@@ -275,24 +302,58 @@ function sleepUntil(at) {
|
|
|
275
302
|
: Effect.sleep(Duration.min(Duration.millis(at - now), DEADLINE_TIMER_STEP)).pipe(Effect.zipRight(sleepUntil(at)))));
|
|
276
303
|
}
|
|
277
304
|
/**
|
|
278
|
-
* Send one request post per member
|
|
279
|
-
*
|
|
280
|
-
*
|
|
305
|
+
* Send one request post per member, waiting at most the send wait. A pending
|
|
306
|
+
* send keeps running and settles its member when it completes: certified
|
|
307
|
+
* asks it, refused makes it `no-answer`, as does pending at the deadline.
|
|
308
|
+
* The send fails only when every post was refused and the gather has not
|
|
309
|
+
* completed, so an operation ends in exactly one refusal or one result.
|
|
281
310
|
*/
|
|
282
311
|
function sendRequests(state, prepared) {
|
|
283
312
|
return Effect.gen(function* () {
|
|
284
|
-
const
|
|
313
|
+
const { id, open } = prepared;
|
|
314
|
+
const sends = yield* Effect.forEach(open.members, (member) => state.ports.sendPost({ to: member, content: prepared.content }).pipe(Effect.mapError((error) => ({ member, reason: error.reason })), Effect.tapError((refusal) => recordRefusal(state, id, refusal)), Effect.either, Effect.forkIn(state.ports.scope)), { concurrency: 1 });
|
|
285
315
|
yield* Fiber.awaitAll(sends).pipe(Effect.timeoutOption(requestWait(state, prepared)));
|
|
286
|
-
const
|
|
287
|
-
const [refusal, ...refusals] =
|
|
288
|
-
if (refusal !== undefined
|
|
289
|
-
|
|
290
|
-
|
|
316
|
+
const { posts, refused } = yield* requestsSoFar(open.members, sends);
|
|
317
|
+
const [refusal, ...refusals] = refused;
|
|
318
|
+
if (refusal !== undefined &&
|
|
319
|
+
refusals.length + 1 === open.members.length &&
|
|
320
|
+
state.gathers.has(id)) {
|
|
321
|
+
yield* forgetGather(state, id);
|
|
322
|
+
return yield* Effect.fail(collectiveFailure(id, {
|
|
291
323
|
kind: "members-unreachable",
|
|
292
324
|
members: [refusal, ...refusals],
|
|
293
325
|
}));
|
|
294
326
|
}
|
|
295
|
-
|
|
327
|
+
yield* updateGather(state, id, (settled) => {
|
|
328
|
+
settled.requestsSettled = true;
|
|
329
|
+
});
|
|
330
|
+
return { postIds: posts.map((post) => post.postId) };
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
/** Record a member whose request post was refused as `no-answer`. */
|
|
334
|
+
function recordRefusal(state, id, { member }) {
|
|
335
|
+
return updateGather(state, id, ({ outcomes }) => {
|
|
336
|
+
if (!outcomes.has(member)) {
|
|
337
|
+
outcomes.set(member, { kind: "no-answer" });
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Apply a change to an open gather, then complete it once its send has
|
|
343
|
+
* returned and every member has an outcome. Until the send returns, only the
|
|
344
|
+
* send decides whether the gather is refused, so no path can emit both a
|
|
345
|
+
* refusal and a result.
|
|
346
|
+
*/
|
|
347
|
+
function updateGather(state, id, change) {
|
|
348
|
+
return Effect.suspend(() => {
|
|
349
|
+
const open = state.gathers.get(id);
|
|
350
|
+
if (open === undefined) {
|
|
351
|
+
return Effect.void;
|
|
352
|
+
}
|
|
353
|
+
change(open);
|
|
354
|
+
return open.requestsSettled && open.outcomes.size === open.members.length
|
|
355
|
+
? completeGather(state, id).pipe(Effect.zipRight(Fiber.interrupt(open.timer)))
|
|
356
|
+
: Effect.void;
|
|
296
357
|
});
|
|
297
358
|
}
|
|
298
359
|
/**
|
|
@@ -320,34 +381,17 @@ function sendGroupRequest(state, prepared) {
|
|
|
320
381
|
* succeeds each member is named with the group post's reason.
|
|
321
382
|
*/
|
|
322
383
|
function unreachableMembers(state, members, groupReason) {
|
|
323
|
-
return
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return [
|
|
330
|
-
{ member, reason: groupReason },
|
|
331
|
-
...others.map((other) => ({ member: other, reason: groupReason })),
|
|
332
|
-
];
|
|
333
|
-
}));
|
|
384
|
+
return lookupRefusals(members, state.ports.lookupMember).pipe(Effect.map(([first, ...rest]) => first === undefined
|
|
385
|
+
? EffectArray.map(members, (member) => ({
|
|
386
|
+
member,
|
|
387
|
+
reason: groupReason,
|
|
388
|
+
}))
|
|
389
|
+
: [first, ...rest]));
|
|
334
390
|
}
|
|
335
391
|
/** How long a send waits for request posts: the bound, never past the deadline. */
|
|
336
392
|
function requestWait(state, prepared) {
|
|
337
393
|
return Duration.min(state.ports.requestSendWait ?? REQUEST_SEND_WAIT, Duration.millis(prepared.untilDeadline));
|
|
338
394
|
}
|
|
339
|
-
/** The request sends that have finished, each with its post or refusal. */
|
|
340
|
-
function settledSends(sends) {
|
|
341
|
-
return Effect.forEach(sends, (send) => Fiber.poll(send), {
|
|
342
|
-
concurrency: 1,
|
|
343
|
-
}).pipe(Effect.map((polls) => polls.flatMap((poll) => Option.toArray(Option.flatMap(poll, (exit) => Exit.isSuccess(exit) ? Option.some(exit.value) : Option.none())))));
|
|
344
|
-
}
|
|
345
|
-
function abandonGather(state, id, sends) {
|
|
346
|
-
return Effect.forEach(sends, (send) => Fiber.interruptFork(send), {
|
|
347
|
-
concurrency: 1,
|
|
348
|
-
discard: true,
|
|
349
|
-
}).pipe(Effect.zipRight(forgetGather(state, id)));
|
|
350
|
-
}
|
|
351
395
|
/** Drop an operation this endpoint abandons, and stop its deadline timer. */
|
|
352
396
|
function forgetGather(state, id) {
|
|
353
397
|
return Effect.suspend(() => {
|
|
@@ -406,18 +450,21 @@ function closeAllGather(state, open, result) {
|
|
|
406
450
|
kind: "operationFailed",
|
|
407
451
|
id: result.id,
|
|
408
452
|
to: open.to,
|
|
409
|
-
error: `
|
|
453
|
+
error: `all_gather ${result.id} failed: its close was not certified (${error.reason})`,
|
|
410
454
|
}),
|
|
411
455
|
onSuccess: (post) => state.ports.emit({ ...result, closePostId: post.postId }),
|
|
412
456
|
}));
|
|
413
457
|
}
|
|
414
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Answer the one request open in the conversation `to` names. The answer
|
|
460
|
+
* carries no request id, so the conversation decides which request it
|
|
461
|
+
* answers; with none open, or several, nothing is sent.
|
|
462
|
+
*/
|
|
463
|
+
function respond(state, to, response) {
|
|
415
464
|
return Effect.gen(function* () {
|
|
416
|
-
const { id } =
|
|
417
|
-
const now = yield* Clock.currentTimeMillis;
|
|
418
|
-
const request = yield* openRequest(state, id, now);
|
|
465
|
+
const { id, request } = yield* openRequest(state, to);
|
|
419
466
|
const refused = refusedAs(id, request.to);
|
|
420
|
-
const value = { kind: "response", ...response };
|
|
467
|
+
const value = { kind: "response", id, ...response };
|
|
421
468
|
const content = yield* responseContent(request, value).pipe(Effect.mapError(refused));
|
|
422
469
|
yield* claimRequest(id, request).pipe(Effect.mapError(refused));
|
|
423
470
|
const post = yield* state.ports.sendPost({ to: request.to, content }).pipe(Effect.tapBoth({
|
|
@@ -428,43 +475,17 @@ function respond(state, response) {
|
|
|
428
475
|
});
|
|
429
476
|
}
|
|
430
477
|
/**
|
|
431
|
-
* The
|
|
432
|
-
*
|
|
433
|
-
* A refusal for an unknown request is addressed to the local agent, since no
|
|
434
|
-
* requester is known.
|
|
478
|
+
* The one request open in the conversation `to` names. A refusal names an id
|
|
479
|
+
* minted for it, since no single request is answered.
|
|
435
480
|
*/
|
|
436
|
-
function openRequest(state,
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
const unavailable = requestUnavailable(request, now);
|
|
446
|
-
return unavailable === undefined
|
|
447
|
-
? Effect.succeed(request)
|
|
448
|
-
: Effect.fail({
|
|
449
|
-
id,
|
|
450
|
-
to: request.to,
|
|
451
|
-
error: collectiveFailure(id, { kind: unavailable }),
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
function requestUnavailable(request, now) {
|
|
455
|
-
switch (request.state) {
|
|
456
|
-
case "open":
|
|
457
|
-
return now >= request.deadlineAt ? "request-expired" : undefined;
|
|
458
|
-
case "sending":
|
|
459
|
-
case "answered":
|
|
460
|
-
return "request-answered";
|
|
461
|
-
case "closed":
|
|
462
|
-
return "request-expired";
|
|
463
|
-
default: {
|
|
464
|
-
const exhaustive = request.state;
|
|
465
|
-
return exhaustive;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
481
|
+
function openRequest(state, to) {
|
|
482
|
+
return Effect.gen(function* () {
|
|
483
|
+
const now = yield* Clock.currentTimeMillis;
|
|
484
|
+
const { id } = yield* mintCollectiveId(state.ports.self);
|
|
485
|
+
const self = state.ports.self.slice("agent:".length);
|
|
486
|
+
const { address } = yield* canonicalMessageAddress(to, self).pipe(Effect.mapError(refusedAs(id, to)));
|
|
487
|
+
return yield* matchOpenRequest(state.requests, address, now).pipe(Effect.mapError((kind) => refusedAs(id, address)(collectiveFailure(id, { kind }))));
|
|
488
|
+
});
|
|
468
489
|
}
|
|
469
490
|
/**
|
|
470
491
|
* Validate an `accept` answer against the request's stored schema and build
|
|
@@ -689,11 +710,10 @@ function recordCountedAnswer(state, open, post, value) {
|
|
|
689
710
|
return Effect.void;
|
|
690
711
|
}
|
|
691
712
|
return outcomeOfResponse(open.requestedSchema, value).pipe(Effect.flatMap((outcome) => {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
: Effect.void;
|
|
713
|
+
return updateGather(state, value.id, () => {
|
|
714
|
+
open.outcomes.set(message.sender, outcome);
|
|
715
|
+
open.answerHashes.set(message.sender, post.recordHash);
|
|
716
|
+
});
|
|
697
717
|
}));
|
|
698
718
|
}
|
|
699
719
|
/** Whether an answer arrived where the operation's answers are sent. */
|