@moltzap/client 2026.922.3 → 2026.930.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.
Files changed (101) hide show
  1. package/README.md +23 -7
  2. package/dist/client-runtime.d.ts.map +1 -1
  3. package/dist/client-runtime.js +28 -11
  4. package/dist/client-runtime.js.map +1 -1
  5. package/dist/contract.d.ts +440 -57
  6. package/dist/contract.d.ts.map +1 -1
  7. package/dist/contract.js +256 -18
  8. package/dist/contract.js.map +1 -1
  9. package/dist/contract.types-check.d.ts +109 -13
  10. package/dist/contract.types-check.d.ts.map +1 -1
  11. package/dist/contract.types-check.js +11 -3
  12. package/dist/contract.types-check.js.map +1 -1
  13. package/dist/daemon/runtime/activation.d.ts +1 -1
  14. package/dist/daemon/runtime/activation.d.ts.map +1 -1
  15. package/dist/daemon/runtime/controller.d.ts +1 -1
  16. package/dist/daemon/runtime/controller.d.ts.map +1 -1
  17. package/dist/daemon/runtime/controller.js +44 -10
  18. package/dist/daemon/runtime/controller.js.map +1 -1
  19. package/dist/daemon/runtime/history-export.d.ts +11 -1
  20. package/dist/daemon/runtime/history-export.d.ts.map +1 -1
  21. package/dist/daemon/runtime/history-export.js +4 -0
  22. package/dist/daemon/runtime/history-export.js.map +1 -1
  23. package/dist/daemon/runtime/index.d.ts.map +1 -1
  24. package/dist/daemon/runtime/index.js +1 -2
  25. package/dist/daemon/runtime/index.js.map +1 -1
  26. package/dist/daemon/runtime/pending-delivery.d.ts +49 -0
  27. package/dist/daemon/runtime/pending-delivery.d.ts.map +1 -0
  28. package/dist/daemon/runtime/pending-delivery.js +115 -0
  29. package/dist/daemon/runtime/pending-delivery.js.map +1 -0
  30. package/dist/daemon/runtime/protocol.d.ts +20 -5
  31. package/dist/daemon/runtime/protocol.d.ts.map +1 -1
  32. package/dist/daemon/runtime/protocol.js +58 -24
  33. package/dist/daemon/runtime/protocol.js.map +1 -1
  34. package/dist/endpoint/addressing/index.d.ts +22 -1
  35. package/dist/endpoint/addressing/index.d.ts.map +1 -1
  36. package/dist/endpoint/addressing/index.js +50 -26
  37. package/dist/endpoint/addressing/index.js.map +1 -1
  38. package/dist/endpoint/collective/operation.d.ts +123 -0
  39. package/dist/endpoint/collective/operation.d.ts.map +1 -0
  40. package/dist/endpoint/collective/operation.js +784 -0
  41. package/dist/endpoint/collective/operation.js.map +1 -0
  42. package/dist/endpoint/collective/shared-answers.d.ts +78 -0
  43. package/dist/endpoint/collective/shared-answers.d.ts.map +1 -0
  44. package/dist/endpoint/collective/shared-answers.js +62 -0
  45. package/dist/endpoint/collective/shared-answers.js.map +1 -0
  46. package/dist/endpoint/collective/validation.d.ts +49 -0
  47. package/dist/endpoint/collective/validation.d.ts.map +1 -0
  48. package/dist/endpoint/collective/validation.js +99 -0
  49. package/dist/endpoint/collective/validation.js.map +1 -0
  50. package/dist/endpoint/collective/wire.d.ts +176 -0
  51. package/dist/endpoint/collective/wire.d.ts.map +1 -0
  52. package/dist/endpoint/collective/wire.js +181 -0
  53. package/dist/endpoint/collective/wire.js.map +1 -0
  54. package/dist/endpoint/engine-durability.d.ts +3 -17
  55. package/dist/endpoint/engine-durability.d.ts.map +1 -1
  56. package/dist/endpoint/engine-durability.js +3 -14
  57. package/dist/endpoint/engine-durability.js.map +1 -1
  58. package/dist/endpoint/engine-send.d.ts +14 -16
  59. package/dist/endpoint/engine-send.d.ts.map +1 -1
  60. package/dist/endpoint/engine-send.js +16 -20
  61. package/dist/endpoint/engine-send.js.map +1 -1
  62. package/dist/endpoint/engine-types.d.ts +32 -15
  63. package/dist/endpoint/engine-types.d.ts.map +1 -1
  64. package/dist/endpoint/engine-types.js +1 -5
  65. package/dist/endpoint/engine-types.js.map +1 -1
  66. package/dist/endpoint/engine.d.ts +1 -1
  67. package/dist/endpoint/engine.d.ts.map +1 -1
  68. package/dist/endpoint/engine.js +17 -14
  69. package/dist/endpoint/engine.js.map +1 -1
  70. package/dist/endpoint/protocol/index.d.ts.map +1 -1
  71. package/dist/endpoint/protocol/index.js +5 -8
  72. package/dist/endpoint/protocol/index.js.map +1 -1
  73. package/dist/endpoint/recovery/index.js +2 -2
  74. package/dist/endpoint/recovery/index.js.map +1 -1
  75. package/dist/endpoint/recovery/reanchor/empty.js +1 -1
  76. package/dist/endpoint/recovery/reanchor/empty.js.map +1 -1
  77. package/dist/endpoint/recovery/store.d.ts +1 -1
  78. package/dist/endpoint/recovery/store.d.ts.map +1 -1
  79. package/dist/endpoint/recovery/store.js +9 -5
  80. package/dist/endpoint/recovery/store.js.map +1 -1
  81. package/dist/endpoint/representation-schemas.d.ts +2 -0
  82. package/dist/endpoint/representation-schemas.d.ts.map +1 -1
  83. package/dist/endpoint/representation-schemas.js +2 -2
  84. package/dist/endpoint/representation-schemas.js.map +1 -1
  85. package/dist/endpoint/representation.d.ts +1 -1
  86. package/dist/endpoint/representation.d.ts.map +1 -1
  87. package/dist/endpoint/representation.js +1 -1
  88. package/dist/endpoint/representation.js.map +1 -1
  89. package/dist/harness-mcp-contract.d.ts +189 -57
  90. package/dist/harness-mcp-contract.d.ts.map +1 -1
  91. package/dist/harness-mcp-contract.js +61 -9
  92. package/dist/harness-mcp-contract.js.map +1 -1
  93. package/dist/harness-mcp-wire.d.ts +3 -3
  94. package/dist/harness-mcp-wire.d.ts.map +1 -1
  95. package/dist/harness-mcp-wire.js +38 -28
  96. package/dist/harness-mcp-wire.js.map +1 -1
  97. package/dist/index.d.ts +1 -1
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +2 -1
  100. package/dist/index.js.map +1 -1
  101. package/package.json +3 -3
package/dist/contract.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { AgentName } from "@moltzap/identity";
3
3
  import canonicalize from "canonicalize";
4
4
  import { Data, Either, Encoding, Schema, } from "effect";
5
+ // safer-arch-ignore shared-kernel-cohesion: This is the one public Client contract; adapters read its items, the collective layer its operations and answers, and the MCP wire its failures, so its consumers differ by design and splitting it would give one contract several homes.
5
6
  /* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-redeclare -- Effect Schemas share their domain names with the nominal values they decode. */
6
7
  const MAXIMUM_CONTENT_BYTES = 32_768;
7
8
  const MAXIMUM_GROUP_MEMBERS = 32;
@@ -92,18 +93,18 @@ export const AgentAddress = addressInput.pipe(Schema.filter((value) => parseAgen
92
93
  export const GroupAddress = addressInput.pipe(Schema.filter(isCanonicalGroupAddress), Schema.brand("GroupAddress"), Schema.annotations({ identifier: "GroupAddress" }));
93
94
  /** Either accepted destination input, including noncanonical group order. */
94
95
  export const MessageAddressInput = addressInput;
95
- function isCanonicalPostId(value) {
96
- if (!value.startsWith("pst_")) {
96
+ function isCanonicalIdentifier(prefix, value) {
97
+ if (!value.startsWith(prefix)) {
97
98
  return false;
98
99
  }
99
- return Either.match(Encoding.decodeBase64Url(value.slice(4)), {
100
+ return Either.match(Encoding.decodeBase64Url(value.slice(prefix.length)), {
100
101
  onLeft: () => false,
101
102
  onRight: (bytes) => bytes.byteLength === HASH_BYTE_LENGTH &&
102
- `pst_${Encoding.encodeBase64Url(bytes)}` === value,
103
+ `${prefix}${Encoding.encodeBase64Url(bytes)}` === value,
103
104
  });
104
105
  }
105
106
  /** Opaque identity minted for one addressed-send invocation. */
106
- export const PostId = Schema.String.pipe(Schema.filter(isCanonicalPostId, {
107
+ export const PostId = Schema.String.pipe(Schema.filter((value) => isCanonicalIdentifier("pst_", value), {
107
108
  identifier: "PostId",
108
109
  description: "Canonical author-scoped post identity",
109
110
  }), Schema.brand("PostId"), Schema.annotations({ identifier: "PostId" }));
@@ -125,11 +126,112 @@ function contentFits(content) {
125
126
  const contentStructure = Schema.NonEmptyArray(ContentPart);
126
127
  /** Nonempty semantic content whose canonical JSON is at most 32,768 bytes. */
127
128
  export const Content = contentStructure.pipe(Schema.filter(contentFits), Schema.annotations({ identifier: "Content" }));
128
- /** Complete semantic input for one addressed send. */
129
- export const SendInput = exactStruct({
129
+ /**
130
+ * Identity of one gather or all_gather, minted by the requesting endpoint.
131
+ * The request, each member's answer, an all_gather's close, the result and
132
+ * any failure carry it.
133
+ */
134
+ export const CollectiveId = Schema.String.pipe(Schema.filter((value) => isCanonicalIdentifier("col_", value), {
135
+ description: "A collective operation id: col_ followed by 43 base64url characters",
136
+ }), Schema.brand("CollectiveId"));
137
+ /**
138
+ * One property of a form-mode schema as a caller states it. The JSON Schema
139
+ * override keeps the recursive JSON value out of host tool schemas, which
140
+ * cannot follow a `$ref` into definitions they do not carry.
141
+ */
142
+ const formProperty = Schema.Record({
143
+ key: Schema.String,
144
+ value: JsonValue,
145
+ }).annotations({
146
+ jsonSchema: {
147
+ type: "object",
148
+ description: 'One MCP form-mode primitive schema: {"type":"string"} with optional enum, minLength, maxLength or format; {"type":"number"} or {"type":"integer"} with optional minimum and maximum; {"type":"boolean"}; or {"type":"array","items":{"enum":[...]}} for a multi-select. Each may carry title, description and default.',
149
+ },
150
+ });
151
+ /**
152
+ * The MCP form-mode `requestedSchema` of a collecting operation: a flat object
153
+ * of primitive properties. This schema fixes its outline; the sending endpoint
154
+ * checks each property against the MCP form-mode grammar before any post.
155
+ */
156
+ export const RequestedSchema = exactStruct({
157
+ $schema: Schema.optionalWith(Schema.String, { exact: true }),
158
+ type: Schema.Literal("object"),
159
+ properties: Schema.Record({ key: Schema.String, value: formProperty }),
160
+ required: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
161
+ }).annotations({
162
+ description: "The answer form: an MCP form-mode requestedSchema, a flat object of primitive properties. For a free-form answer use one string property.",
163
+ });
164
+ /**
165
+ * One answer to a collecting operation, field by field. Its value space is MCP
166
+ * `ElicitResult` content's; the request's schema decides which fields apply.
167
+ */
168
+ export const AnswerContent = Schema.Record({
169
+ key: Schema.String,
170
+ value: Schema.Union(Schema.String, Schema.Number.pipe(Schema.finite()), Schema.Boolean, Schema.Array(Schema.String)),
171
+ }).annotations({
172
+ description: "The answer, one field per requestedSchema property",
173
+ });
174
+ /** The longest deadline a collecting operation may state: 30 days, in seconds. */
175
+ export const MAXIMUM_DEADLINE_SECONDS = 2_592_000;
176
+ /**
177
+ * Multicast: one post to the `to` address, complete when certified. `op`
178
+ * defaults to multicast, so an omitted `op` and an omitted `collective` mean
179
+ * the same operation.
180
+ */
181
+ const multicastOperation = exactStruct({
182
+ op: Schema.optionalWith(Schema.Literal("multicast"), { exact: true }),
183
+ });
184
+ /**
185
+ * A collecting operation: the text is a question to every member of `to`.
186
+ * A gather sends one request post to each member, in that member's direct
187
+ * conversation with the requester, and only the requester receives the
188
+ * result. An all_gather sends one request post to the `group:` conversation
189
+ * `to` names; members answer there, no model sees a peer's answer before the
190
+ * requester's close, and every member receives the same result. The deadline
191
+ * is relative, in whole seconds; the sending endpoint converts it to an
192
+ * absolute time at send.
193
+ */
194
+ const collectingOperation = exactStruct({
195
+ op: Schema.Literal("gather", "all_gather"),
196
+ deadline: Schema.Number.pipe(Schema.int(), Schema.between(1, MAXIMUM_DEADLINE_SECONDS)).annotations({
197
+ description: "Seconds from now until the operation closes, a whole number from 1 to 2592000 (30 days). Members who have not answered by then are reported as no-answer.",
198
+ }),
199
+ requestedSchema: RequestedSchema,
200
+ });
201
+ /**
202
+ * The collective operation one send performs, discriminated by `op`. Each
203
+ * operation is one member of this union; the schema carries no identifier so
204
+ * its JSON Schema embeds inline in a host tool's parameters.
205
+ */
206
+ export const CollectiveOperation = Schema.Union(multicastOperation, collectingOperation).annotations({
207
+ description: 'The collective operation. Omit it, or its op, for multicast: one post to the to address. {"op":"gather","deadline":<seconds>,"requestedSchema":<form>} asks each member of to the message text as a question, privately, and returns one result with each member\'s answer, decline, or no-answer once all have replied or the deadline passes. {"op":"all_gather","deadline":<seconds>,"requestedSchema":<form>} asks one question to a group: to must be a group: address, no member sees another\'s answer before the close, and everyone, the asker included, receives the same result at the close.',
208
+ });
209
+ /**
210
+ * A member's reply to one collective request. Only `accept` carries content,
211
+ * valid against the request's schema; the member's endpoint addresses the
212
+ * reply to the conversation the request arrived in.
213
+ */
214
+ export const CollectiveResponse = Schema.Union(exactStruct({
215
+ id: CollectiveId,
216
+ action: Schema.Literal("accept"),
217
+ content: AnswerContent,
218
+ }), exactStruct({
219
+ id: CollectiveId,
220
+ action: Schema.Literal("decline", "cancel"),
221
+ })).annotations({
222
+ description: 'Answer a collective request: {"id":<request id>,"action":"accept","content":{...}} with content valid against the request\'s schema, or {"id":<request id>,"action":"decline"} or "cancel" without content. The reply goes to the conversation the request arrived in, the requester for a gather and the group for an all_gather, whatever to says, and each request takes one answer.',
223
+ });
224
+ /**
225
+ * One send: an operation with its address, body text and collective
226
+ * operation, multicast when `collective` is omitted; or a response to a
227
+ * collective request, which names no address because the member's endpoint
228
+ * derives it from the request.
229
+ */
230
+ export const SendInput = Schema.Union(exactStruct({
130
231
  to: MessageAddressInput,
131
- content: Content,
132
- }).annotations({ identifier: "SendInput" });
232
+ text: wellFormedString,
233
+ collective: Schema.optionalWith(CollectiveOperation, { exact: true }),
234
+ }), exactStruct({ collectiveResponse: CollectiveResponse })).annotations({ identifier: "SendInput" });
133
235
  const directMessageStructure = exactStruct({
134
236
  kind: Schema.Literal("direct"),
135
237
  postId: PostId,
@@ -160,24 +262,99 @@ const groupMessage = groupMessageStructure.pipe(Schema.filter((message) => {
160
262
  identifier: "GroupMessage",
161
263
  description: "A group delivery whose canonical address, members, and sender agree",
162
264
  }));
163
- /** Exact discriminated inbound message projection. */
265
+ /** One certified remote-authored post, direct or to a fixed group. */
164
266
  export const InboundMessage = Schema.Union(directMessage, groupMessage).annotations({ identifier: "InboundMessage" });
267
+ /**
268
+ * A multicast delivered to this endpoint. The message content is the post's
269
+ * content without the collective layer's part.
270
+ */
271
+ const multicastItem = exactStruct({
272
+ kind: Schema.Literal("multicast"),
273
+ message: InboundMessage,
274
+ });
275
+ /** Absolute epoch milliseconds; endpoints assume zero clock skew. */
276
+ const epochMillis = Schema.Number.pipe(Schema.int(), Schema.positive());
277
+ /**
278
+ * A question another agent asked this one. `postId` is the certified request
279
+ * post's and `to` the conversation it arrived in: the requester's `agent:`
280
+ * address for a gather, the group's `group:` address for an all_gather. The
281
+ * member answers once with a `collectiveResponse` naming `id`, and the answer
282
+ * goes to `to`.
283
+ */
284
+ const collectiveRequestItem = exactStruct({
285
+ kind: Schema.Literal("collectiveRequest"),
286
+ id: CollectiveId,
287
+ postId: PostId,
288
+ from: AgentAddress,
289
+ to: MessageAddressInput,
290
+ question: wellFormedString,
291
+ requestedSchema: RequestedSchema,
292
+ deadlineAt: epochMillis,
293
+ });
294
+ /** One member's outcome in a completed gather or all_gather, discriminated by `kind`. */
295
+ const memberOutcome = Schema.Union(exactStruct({ kind: Schema.Literal("answered"), content: AnswerContent }), exactStruct({ kind: Schema.Literal("declined") }), exactStruct({ kind: Schema.Literal("cancelled") }), exactStruct({ kind: Schema.Literal("invalid"), reason: Schema.String }), exactStruct({ kind: Schema.Literal("no-answer") }));
296
+ /**
297
+ * The result of a gather this endpoint started, or of an all_gather this
298
+ * endpoint started or was asked: exactly one outcome per member, in member
299
+ * order. `to` is the address the operation named. An all_gather's result
300
+ * names its certified close post in `closePostId`; every member's result is
301
+ * built from exactly the answers that close lists, so each endpoint's result
302
+ * is the same.
303
+ */
304
+ const collectiveResultItem = exactStruct({
305
+ kind: Schema.Literal("collectiveResult"),
306
+ id: CollectiveId,
307
+ to: MessageAddressInput,
308
+ question: wellFormedString,
309
+ outcomes: Schema.NonEmptyArray(exactStruct({ member: AgentAddress, outcome: memberOutcome })),
310
+ closePostId: Schema.optionalWith(PostId, { exact: true }),
311
+ });
312
+ /**
313
+ * A collective send that failed after the host's tool had returned, or an
314
+ * all_gather whose close could not be certified. `to` is the operation's
315
+ * address, or the request's conversation for a response; `error` is the text
316
+ * a waiting host would have received as the tool error.
317
+ */
318
+ const operationFailedItem = exactStruct({
319
+ kind: Schema.Literal("operationFailed"),
320
+ id: CollectiveId,
321
+ to: MessageAddressInput,
322
+ error: Schema.String,
323
+ });
324
+ /**
325
+ * One inbound item, discriminated by `kind`. The endpoint consumes the
326
+ * collective layer's protocol posts, posts whose collective part is malformed
327
+ * or duplicated, and multicasts that carry nothing besides that part; every
328
+ * other certified post becomes one item, and the endpoint itself emits
329
+ * results and failures.
330
+ */
331
+ export const InboundItem = Schema.Union(multicastItem, collectiveRequestItem, collectiveResultItem, operationFailedItem).annotations({
332
+ identifier: "InboundItem",
333
+ });
165
334
  const sendFailure = Schema.Literal("invalid-address", "unknown-agent", "membership-invalid", "content-invalid", "not-registered", "version-mismatch", "certification-unavailable", "persistence-failed", "network-unavailable");
166
- const historyExportSendOutcome = Schema.Union(exactStruct({ kind: Schema.Literal("certified"), postId: PostId }), exactStruct({ kind: Schema.Literal("failed"), reason: sendFailure }));
167
335
  /**
168
- * One line of the daemon's optional history export: a certified inbound
169
- * delivery, a completed `send` invocation with its outcome, or the one line
170
- * that says the export stopped. Readers decode the file line by line with
171
- * this schema rather than copying its shape.
336
+ * How one send ended in the history export: the posts certified by the time
337
+ * it returned, with the operation id of a gather or all_gather, or the
338
+ * error it returned.
339
+ */
340
+ const historyExportSendOutcome = Schema.Union(exactStruct({
341
+ kind: Schema.Literal("sent"),
342
+ operationId: Schema.optionalWith(CollectiveId, { exact: true }),
343
+ postIds: Schema.Array(PostId),
344
+ }), exactStruct({ kind: Schema.Literal("failed"), error: Schema.String }));
345
+ /**
346
+ * One line of the daemon's optional history export: an item as the daemon
347
+ * published it, a completed `send` invocation with its input and outcome, or
348
+ * the one line that says the export stopped. Readers decode the file line by
349
+ * line with this schema rather than copying its shape.
172
350
  */
173
351
  export const HistoryExportRecord = Schema.Union(exactStruct({
174
352
  kind: Schema.Literal("inbound"),
175
- message: InboundMessage,
353
+ item: InboundItem,
176
354
  at: Schema.DateTimeUtc,
177
355
  }), exactStruct({
178
356
  kind: Schema.Literal("outbound"),
179
- to: MessageAddressInput,
180
- content: Content,
357
+ input: SendInput,
181
358
  outcome: historyExportSendOutcome,
182
359
  at: Schema.DateTimeUtc,
183
360
  }), exactStruct({
@@ -191,6 +368,67 @@ export class SendError extends Data.TaggedError("SendError") {
191
368
  return `send failed: ${this.reason}`;
192
369
  }
193
370
  }
371
+ /**
372
+ * Why a collective send was refused, discriminated by `kind`: a gather or
373
+ * all_gather whose schema is outside the form-mode grammar or whose request
374
+ * post some member could not receive, or a response the member's endpoint
375
+ * cannot send.
376
+ */
377
+ const collectiveFailure = Schema.Union(exactStruct({
378
+ kind: Schema.Literal("members-unreachable"),
379
+ members: Schema.NonEmptyArray(exactStruct({ member: AgentAddress, reason: sendFailure })),
380
+ }), exactStruct({
381
+ kind: Schema.Literal("schema-invalid"),
382
+ detail: Schema.String,
383
+ }), exactStruct({
384
+ kind: Schema.Literal("answer-invalid"),
385
+ fields: Schema.NonEmptyArray(exactStruct({
386
+ field: Schema.String,
387
+ reason: Schema.Literal("missing", "unexpected", "invalid"),
388
+ detail: Schema.optionalWith(Schema.String, { exact: true }),
389
+ })),
390
+ }), exactStruct({ kind: Schema.Literal("request-unknown") }), exactStruct({ kind: Schema.Literal("request-answered") }), exactStruct({ kind: Schema.Literal("request-expired") }));
391
+ /**
392
+ * Decode a collective failure carried across the loopback MCP boundary.
393
+ * @param value Untrusted failure detail from a refused send's error data.
394
+ * @returns The validated failure.
395
+ */
396
+ export const decodeCollectiveFailure = Schema.decodeUnknown(collectiveFailure);
397
+ function describeCollectiveFailure(failure) {
398
+ switch (failure.kind) {
399
+ case "members-unreachable":
400
+ return `unreachable members: ${failure.members
401
+ .map(({ member, reason }) => `${member} (${reason})`)
402
+ .join(", ")}`;
403
+ case "schema-invalid":
404
+ return `requestedSchema is not an MCP form-mode schema: ${failure.detail}`;
405
+ case "answer-invalid":
406
+ return `content does not match the request's schema: ${failure.fields
407
+ .map(({ field, reason, detail }) => detail === undefined
408
+ ? `${field}: ${reason}`
409
+ : `${field}: ${reason} (${detail})`)
410
+ .join("; ")}`;
411
+ case "request-unknown":
412
+ return "no open collective request has this id";
413
+ case "request-answered":
414
+ return "this request was already answered";
415
+ case "request-expired":
416
+ return "this request's deadline has passed";
417
+ default: {
418
+ const exhaustive = failure;
419
+ return exhaustive;
420
+ }
421
+ }
422
+ }
423
+ /**
424
+ * A collective send was refused. The message names each unreachable member or
425
+ * failing field, so a host can hand it to its model as the tool error.
426
+ */
427
+ export class CollectiveError extends Data.TaggedError("CollectiveError") {
428
+ get message() {
429
+ return `collective ${this.id} failed: ${describeCollectiveFailure(this.failure)}`;
430
+ }
431
+ }
194
432
  /** The endpoint's sole inbound subscription failed. */
195
433
  export class ListenError extends Data.TaggedError("ListenError") {
196
434
  get message() {
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,IAAI,EAEJ,MAAM,EACN,QAAQ,EACR,MAAM,GAEP,MAAM,QAAQ,CAAC;AAEhB,0KAA0K;AAE1K,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AACtC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AACtC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AAEtC,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,IAAI;IACX,gBAAgB,EAAE,OAAgB;CACnC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAsC,MAAc,EAAE,EAAE,CAC1E,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;AAEpE,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;AAEzC,SAAS,oBAAoB,CAAC,KAAa;IACzC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,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@
1
1
  /**
2
- * @file The public Client is one addressed structural endpoint. Sends always
3
- * create one fresh Client-owned intent, and inbound deliveries carry a certified
4
- * direct or complete-group message plus transport-only acknowledgment.
2
+ * @file The public Client is one addressed structural endpoint whose sends are
3
+ * operations or collective responses and whose inbound deliveries are tagged
4
+ * items. An operation carries an address, text and an optional collective
5
+ * operation, multicast by default or a gather or all_gather with its deadline
6
+ * and schema; a response names its request and no address. Each inbound
7
+ * delivery carries one item plus transport-only acknowledgment: a multicast
8
+ * with the certified direct or complete-group message, a collective request
9
+ * naming the conversation it arrived in, a collective result that names an
10
+ * all_gather's close post, or an operation failure. A send returns a
11
+ * collecting operation's id and fails with a closed send reason or a
12
+ * collective failure.
5
13
  */
6
14
  import type { DateTime, Effect, Scope, Stream } from "effect";
7
- import type { acquireHarnessEndpoint, AgentAddress, ConnectError, Content, ContentPart, DeliveryAcknowledgeError, DirectMessage, GroupAddress, GroupMessage, HarnessEndpoint, HistoryExportRecord, InboundDelivery, InboundMessage, ListenError, MessageAddressInput, PostId, SendError, SendInput } from "./index.js";
15
+ import type { acquireHarnessEndpoint, AgentAddress, CollectiveError, CollectiveOperation, CollectiveResponse, ConnectError, Content, ContentPart, DeliveryAcknowledgeError, DirectMessage, GroupAddress, GroupMessage, HarnessEndpoint, HistoryExportRecord, InboundDelivery, InboundItem, InboundMessage, JsonValue, ListenError, MessageAddressInput, PostId, SendError, SendInput, SendResult } from "./index.js";
8
16
  type Equal<Left, Right> = [Left, Right] extends [Right, Left] ? true : false;
9
17
  type Expect<Value extends true> = Value;
18
+ type CollectiveId = CollectiveError["id"];
19
+ type ExpectedRequestedSchema = Readonly<{
20
+ $schema?: string;
21
+ type: "object";
22
+ properties: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
23
+ required?: readonly string[];
24
+ }>;
25
+ type ExpectedAnswerContent = Readonly<Record<string, string | number | boolean | readonly string[]>>;
26
+ type ExpectedCollectiveOperation = Readonly<{
27
+ op?: "multicast";
28
+ }> | Readonly<{
29
+ op: "gather" | "all_gather";
30
+ deadline: number;
31
+ requestedSchema: ExpectedRequestedSchema;
32
+ }>;
33
+ type ExpectedCollectiveResponse = Readonly<{
34
+ id: CollectiveId;
35
+ action: "accept";
36
+ content: ExpectedAnswerContent;
37
+ }> | Readonly<{
38
+ id: CollectiveId;
39
+ action: "decline" | "cancel";
40
+ }>;
10
41
  type ExpectedSendInput = Readonly<{
11
42
  to: MessageAddressInput;
12
- content: Content;
43
+ text: string;
44
+ collective?: CollectiveOperation;
45
+ }> | Readonly<{
46
+ collectiveResponse: CollectiveResponse;
47
+ }>;
48
+ type ExpectedSendResult = Readonly<{
49
+ operationId?: CollectiveId;
13
50
  }>;
14
51
  type ExpectedDirectMessage = Readonly<{
15
52
  kind: "direct";
@@ -31,15 +68,68 @@ type ExpectedGroupMessage = Readonly<{
31
68
  ];
32
69
  content: Content;
33
70
  }>;
34
- type ExpectedDelivery = Readonly<{
71
+ type ExpectedMemberOutcome = Readonly<{
72
+ kind: "answered";
73
+ content: ExpectedAnswerContent;
74
+ }> | Readonly<{
75
+ kind: "declined";
76
+ }> | Readonly<{
77
+ kind: "cancelled";
78
+ }> | Readonly<{
79
+ kind: "invalid";
80
+ reason: string;
81
+ }> | Readonly<{
82
+ kind: "no-answer";
83
+ }>;
84
+ type ExpectedInboundItem = Readonly<{
85
+ kind: "multicast";
35
86
  message: InboundMessage;
87
+ }> | Readonly<{
88
+ kind: "collectiveRequest";
89
+ id: CollectiveId;
90
+ postId: PostId;
91
+ from: AgentAddress;
92
+ to: MessageAddressInput;
93
+ question: string;
94
+ requestedSchema: ExpectedRequestedSchema;
95
+ deadlineAt: number;
96
+ }> | Readonly<{
97
+ kind: "collectiveResult";
98
+ id: CollectiveId;
99
+ to: MessageAddressInput;
100
+ question: string;
101
+ outcomes: readonly [
102
+ Readonly<{
103
+ member: AgentAddress;
104
+ outcome: ExpectedMemberOutcome;
105
+ }>,
106
+ ...Array<Readonly<{
107
+ member: AgentAddress;
108
+ outcome: ExpectedMemberOutcome;
109
+ }>>
110
+ ];
111
+ closePostId?: PostId;
112
+ }> | Readonly<{
113
+ kind: "operationFailed";
114
+ id: CollectiveId;
115
+ to: MessageAddressInput;
116
+ error: string;
117
+ }>;
118
+ type ExpectedDelivery = Readonly<{
119
+ item: InboundItem;
36
120
  acknowledge: Effect.Effect<void, DeliveryAcknowledgeError>;
37
121
  }>;
38
122
  type ExpectedEndpoint = Readonly<{
39
- send: (input: SendInput) => Effect.Effect<void, SendError>;
123
+ send: (input: SendInput, options?: Readonly<{
124
+ failureDelivery?: "result" | "inbound";
125
+ }>) => Effect.Effect<SendResult, SendError | CollectiveError>;
40
126
  messages: Stream.Stream<InboundDelivery, ListenError>;
41
127
  }>;
128
+ type CollectiveOperationIsExact = Expect<Equal<CollectiveOperation, ExpectedCollectiveOperation>>;
129
+ type CollectiveResponseIsExact = Expect<Equal<CollectiveResponse, ExpectedCollectiveResponse>>;
42
130
  type SendInputIsExact = Expect<Equal<SendInput, ExpectedSendInput>>;
131
+ type SendResultIsExact = Expect<Equal<SendResult, ExpectedSendResult>>;
132
+ type InboundItemIsExact = Expect<Equal<InboundItem, ExpectedInboundItem>>;
43
133
  type DirectMessageIsExact = Expect<Equal<DirectMessage, ExpectedDirectMessage>>;
44
134
  type GroupMessageIsExact = Expect<Equal<GroupMessage, ExpectedGroupMessage>>;
45
135
  type InboundMessageIsExact = Expect<Equal<InboundMessage, DirectMessage | GroupMessage>>;
@@ -47,18 +137,18 @@ type DeliveryIsExact = Expect<Equal<InboundDelivery, ExpectedDelivery>>;
47
137
  type EndpointIsExact = Expect<Equal<HarnessEndpoint, ExpectedEndpoint>>;
48
138
  type ExpectedHistoryExportRecord = Readonly<{
49
139
  kind: "inbound";
50
- message: InboundMessage;
140
+ item: InboundItem;
51
141
  at: DateTime.Utc;
52
142
  }> | Readonly<{
53
143
  kind: "outbound";
54
- to: MessageAddressInput;
55
- content: Content;
144
+ input: SendInput;
56
145
  outcome: Readonly<{
57
- kind: "certified";
58
- postId: PostId;
146
+ kind: "sent";
147
+ operationId?: CollectiveId;
148
+ postIds: readonly PostId[];
59
149
  }> | Readonly<{
60
150
  kind: "failed";
61
- reason: SendError["reason"];
151
+ error: string;
62
152
  }>;
63
153
  at: DateTime.Utc;
64
154
  }> | Readonly<{
@@ -71,6 +161,7 @@ type ContentIsNonempty = Expect<Content extends readonly [ContentPart, ...Conten
71
161
  type AgentAddressIsInput = Expect<AgentAddress extends MessageAddressInput ? true : false>;
72
162
  type GroupAddressIsInput = Expect<GroupAddress extends MessageAddressInput ? true : false>;
73
163
  type SendReasonsAreExact = Expect<Equal<SendError["reason"], "invalid-address" | "unknown-agent" | "membership-invalid" | "content-invalid" | "not-registered" | "version-mismatch" | "certification-unavailable" | "persistence-failed" | "network-unavailable">>;
164
+ type CollectiveFailureKindsAreExact = Expect<Equal<CollectiveError["failure"]["kind"], "members-unreachable" | "schema-invalid" | "answer-invalid" | "request-unknown" | "request-answered" | "request-expired">>;
74
165
  type ListenReasonsAreExact = Expect<Equal<ListenError["reason"], "already-listening" | "incompatible-daemon" | "transport-failed" | "decode-failed">>;
75
166
  type AcknowledgeReasonsAreExact = Expect<Equal<DeliveryAcknowledgeError["reason"], "unknown-delivery" | "delivery-conflict" | "persistence-failed" | "transport-failed">>;
76
167
  type ConnectReasonsAreExact = Expect<Equal<ConnectError["reason"], "transport-failed" | "decode-failed" | "incompatible-daemon">>;
@@ -78,7 +169,11 @@ type AcquisitionIsScoped = Expect<Equal<Parameters<typeof acquireHarnessEndpoint
78
169
  type AcquisitionResultIsExact = Expect<Equal<ReturnType<typeof acquireHarnessEndpoint>, Effect.Effect<HarnessEndpoint, ConnectError, Scope.Scope>>>;
79
170
  /** Compile-time witnesses for the accepted public Client boundary. */
80
171
  export type HarnessEndpointCanaries = [
172
+ CollectiveOperationIsExact,
173
+ CollectiveResponseIsExact,
81
174
  SendInputIsExact,
175
+ SendResultIsExact,
176
+ InboundItemIsExact,
82
177
  DirectMessageIsExact,
83
178
  GroupMessageIsExact,
84
179
  InboundMessageIsExact,
@@ -88,6 +183,7 @@ export type HarnessEndpointCanaries = [
88
183
  AgentAddressIsInput,
89
184
  GroupAddressIsInput,
90
185
  SendReasonsAreExact,
186
+ CollectiveFailureKindsAreExact,
91
187
  HistoryExportRecordIsExact,
92
188
  ListenReasonsAreExact,
93
189
  AcknowledgeReasonsAreExact,
@@ -1 +1 @@
1
- {"version":3,"file":"contract.types-check.d.ts","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,MAAM,EACN,SAAS,EACT,SAAS,EACV,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,iBAAiB,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,mBAAmB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AACH,KAAK,qBAAqB,GAAG,QAAQ,CAAC;IACpC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AACH,KAAK,o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AAgB,GAChB,kBAAkB,GAClB,2BAA2B,GAC3B,oBAAoB,GACpB,qBAAqB,CACxB,CACF,CAAC;AACF,KAAK,qBAAqB,GAAG,MAAM,CACjC,KAAK,CACH,WAAW,CAAC,QAAQ,CAAC,EACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,GAClB,eAAe,CAClB,CACF,CAAC;AACF,KAAK,0BAA0B,GAAG,MAAM,CACtC,KAAK,CACH,wBAAwB,CAAC,QAAQ,CAAC,EAChC,kBAAkB,GAClB,mBAAmB,GACnB,oBAAoB,GACpB,kBAAkB,CACrB,CACF,CAAC;AACF,KAAK,sBAAsB,GAAG,MAAM,CAClC,KAAK,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,oBAAoB;IACpB,mBAAmB;IACnB,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,0BAA0B;IAC1B,qBAAqB;IACrB,0BAA0B;IAC1B,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;CACzB,CAAC"}
1
+ {"version":3,"file":"contract.types-check.d.ts","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK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CAAC,eAAe,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAC1D,CACF,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAAG;IACpC,0BAA0B;IAC1B,yBAAyB;IACzB,gBAAgB;IAChB,iBAAiB;IACjB,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"}
@@ -1,7 +1,15 @@
1
1
  /**
2
- * @file The public Client is one addressed structural endpoint. Sends always
3
- * create one fresh Client-owned intent, and inbound deliveries carry a certified
4
- * direct or complete-group message plus transport-only acknowledgment.
2
+ * @file The public Client is one addressed structural endpoint whose sends are
3
+ * operations or collective responses and whose inbound deliveries are tagged
4
+ * items. An operation carries an address, text and an optional collective
5
+ * operation, multicast by default or a gather or all_gather with its deadline
6
+ * and schema; a response names its request and no address. Each inbound
7
+ * delivery carries one item plus transport-only acknowledgment: a multicast
8
+ * with the certified direct or complete-group message, a collective request
9
+ * naming the conversation it arrived in, a collective result that names an
10
+ * all_gather's close post, or an operation failure. A send returns a
11
+ * collecting operation's id and fails with a closed send reason or a
12
+ * collective failure.
5
13
  */
6
14
  export {};
7
15
  //# sourceMappingURL=contract.types-check.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.types-check.js","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
1
+ {"version":3,"file":"contract.types-check.js","sourceRoot":"","sources":["../src/contract.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -3,7 +3,6 @@ import type { Registry } from "@moltzap/identity/registry";
3
3
  import type { Router } from "@moltzap/router";
4
4
  import { type VerifiedAgentCard } from "@moltzap/identity";
5
5
  import { Deferred, Effect, type Scope } from "effect";
6
- import type { HistoryExportPort } from "../../endpoint/engine-types.js";
7
6
  import type { EndpointEngine, EndpointEngineInput, EngineInitializationError } from "../../endpoint/engine.js";
8
7
  import type { RouterWorker, RouterWorkerInput, RouterWorkerProtocolError, RouterWorkerTransportError } from "../../endpoint/router-worker/index.js";
9
8
  import type { EndpointStore } from "../../endpoint/store.js";
@@ -11,6 +10,7 @@ import type { HarnessMessageReadyEvent } from "../../harness-mcp-contract.js";
11
10
  import type { HarnessMcpSubscriptionHandler } from "../../harness-mcp-subscription.js";
12
11
  import type { makeHarnessMcpHttpHandler } from "../../harness-mcp-wire.js";
13
12
  import type { DaemonBootstrap } from "../configuration.js";
13
+ import type { HistoryExportPort } from "./history-export.js";
14
14
  import { type DaemonManagementOperations } from "../management.js";
15
15
  import { type DaemonRegistrationState } from "../registration.js";
16
16
  type SubscriptionHandler = HarnessMcpSubscriptionHandler<HarnessMessageReadyEvent>;