@treeseed/sdk 0.13.0-rc.53 → 0.13.0-rc.55

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 (43) hide show
  1. package/README.md +4 -0
  2. package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
  3. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
  4. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +240 -240
  5. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
  6. package/dist/capacity-provider/client.d.ts +18 -3
  7. package/dist/capacity-provider/client.js +6 -0
  8. package/dist/capacity-provider/contracts/governance.d.ts +28 -1
  9. package/dist/capacity-provider/index.d.ts +1 -0
  10. package/dist/capacity-provider/index.js +1 -0
  11. package/dist/capacity-provider/sandbox-contracts.d.ts +422 -0
  12. package/dist/capacity-provider/sandbox-contracts.js +71 -0
  13. package/dist/capacity-provider/validation.d.ts +2 -1
  14. package/dist/capacity-provider/validation.js +23 -0
  15. package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
  16. package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
  17. package/dist/content/validation/content-model-schemas.d.ts +570 -570
  18. package/dist/content/validation/portable-content-data.d.ts +61 -61
  19. package/dist/deployment/ai-mode.d.ts +4 -4
  20. package/dist/deployment/schemas.d.ts +418 -100
  21. package/dist/deployment/schemas.js +23 -1
  22. package/dist/development/schemas.d.ts +22 -22
  23. package/dist/operator-contracts/canonical-command-tree.js +63 -3
  24. package/dist/operator-contracts/catalog/communication-operations.d.ts +300 -33
  25. package/dist/operator-contracts/catalog/communication-operations.js +56 -2
  26. package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
  27. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  28. package/dist/operator-contracts/communication/contracts.d.ts +1261 -71
  29. package/dist/operator-contracts/communication/contracts.js +99 -7
  30. package/dist/operator-contracts/control-plane-operations.d.ts +592 -66
  31. package/dist/operator-contracts/control-plane-operations.js +4 -1
  32. package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
  33. package/dist/operator-contracts/inbox/contracts.js +134 -0
  34. package/dist/operator-contracts/index.d.ts +1 -0
  35. package/dist/operator-contracts/index.js +1 -0
  36. package/dist/operator-contracts/mcp.js +1 -1
  37. package/dist/security/encrypted-envelope.d.ts +177 -0
  38. package/dist/security/encrypted-envelope.js +34 -0
  39. package/dist/security/envelope-codec.d.ts +38 -0
  40. package/dist/security/envelope-codec.js +96 -0
  41. package/dist/security/index.d.ts +2 -0
  42. package/dist/security/index.js +2 -0
  43. package/package.json +5 -1
@@ -11,20 +11,158 @@ export declare const communicationRecipientSchema: z.ZodObject<{
11
11
  }>;
12
12
  export declare const communicationSendRequestSchema: z.ZodObject<{
13
13
  message: z.ZodString;
14
- projectId: z.ZodString;
15
14
  recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
15
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
17
16
  }, "strict", z.ZodTypeAny, {
18
17
  message: string;
19
- projectId: string;
20
18
  timeoutSeconds?: number | undefined;
21
19
  recipients?: string[] | undefined;
22
20
  }, {
23
21
  message: string;
24
- projectId: string;
25
22
  timeoutSeconds?: number | undefined;
26
23
  recipients?: string[] | undefined;
27
24
  }>;
25
+ export declare const communicationTopicEventTypeSchema: z.ZodEnum<["message.posted", "mention.acknowledged", "response_lease.accepted", "agent.progress", "agent.response", "agent.abstained", "agent.failed"]>;
26
+ export declare const communicationTopicEventSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ sequence: z.ZodNumber;
29
+ teamId: z.ZodString;
30
+ topicId: z.ZodString;
31
+ channel: z.ZodString;
32
+ type: z.ZodEnum<["message.posted", "mention.acknowledged", "response_lease.accepted", "agent.progress", "agent.response", "agent.abstained", "agent.failed"]>;
33
+ occurredAt: z.ZodString;
34
+ sendId: z.ZodNullable<z.ZodString>;
35
+ invocationId: z.ZodNullable<z.ZodString>;
36
+ assignmentId: z.ZodNullable<z.ZodString>;
37
+ actor: z.ZodObject<{
38
+ kind: z.ZodEnum<["user", "agent", "provider", "control-plane"]>;
39
+ id: z.ZodString;
40
+ handle: z.ZodNullable<z.ZodString>;
41
+ }, "strict", z.ZodTypeAny, {
42
+ kind: "control-plane" | "provider" | "agent" | "user";
43
+ id: string;
44
+ handle: string | null;
45
+ }, {
46
+ kind: "control-plane" | "provider" | "agent" | "user";
47
+ id: string;
48
+ handle: string | null;
49
+ }>;
50
+ summary: z.ZodString;
51
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
52
+ }, "strict", z.ZodTypeAny, {
53
+ teamId: string;
54
+ topicId: string;
55
+ sendId: string | null;
56
+ invocationId: string | null;
57
+ assignmentId: string | null;
58
+ sequence: number;
59
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
60
+ payload: Record<string, unknown>;
61
+ id: string;
62
+ actor: {
63
+ kind: "control-plane" | "provider" | "agent" | "user";
64
+ id: string;
65
+ handle: string | null;
66
+ };
67
+ summary: string;
68
+ channel: string;
69
+ occurredAt: string;
70
+ }, {
71
+ teamId: string;
72
+ topicId: string;
73
+ sendId: string | null;
74
+ invocationId: string | null;
75
+ assignmentId: string | null;
76
+ sequence: number;
77
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
78
+ payload: Record<string, unknown>;
79
+ id: string;
80
+ actor: {
81
+ kind: "control-plane" | "provider" | "agent" | "user";
82
+ id: string;
83
+ handle: string | null;
84
+ };
85
+ summary: string;
86
+ channel: string;
87
+ occurredAt: string;
88
+ }>;
89
+ export declare const communicationDiagnosticSchema: z.ZodObject<{
90
+ availability: z.ZodEnum<["available", "partial", "unavailable"]>;
91
+ reason: z.ZodNullable<z.ZodString>;
92
+ provider: z.ZodObject<{
93
+ providerId: z.ZodNullable<z.ZodString>;
94
+ executionProviderId: z.ZodNullable<z.ZodString>;
95
+ runtimeVersion: z.ZodNullable<z.ZodString>;
96
+ }, "strict", z.ZodTypeAny, {
97
+ providerId: string | null;
98
+ executionProviderId: string | null;
99
+ runtimeVersion: string | null;
100
+ }, {
101
+ providerId: string | null;
102
+ executionProviderId: string | null;
103
+ runtimeVersion: string | null;
104
+ }>;
105
+ selection: z.ZodObject<{
106
+ model: z.ZodNullable<z.ZodString>;
107
+ capabilities: z.ZodArray<z.ZodString, "many">;
108
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
109
+ }, "strict", z.ZodTypeAny, {
110
+ parameters: Record<string, unknown>;
111
+ capabilities: string[];
112
+ model: string | null;
113
+ }, {
114
+ parameters: Record<string, unknown>;
115
+ capabilities: string[];
116
+ model: string | null;
117
+ }>;
118
+ identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
119
+ contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
120
+ usage: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
121
+ timing: z.ZodRecord<z.ZodString, z.ZodUnknown>;
122
+ resources: z.ZodRecord<z.ZodString, z.ZodUnknown>;
123
+ traceEvents: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
124
+ fullPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
125
+ }, "strict", z.ZodTypeAny, {
126
+ resources: Record<string, unknown>;
127
+ reason: string | null;
128
+ provider: {
129
+ providerId: string | null;
130
+ executionProviderId: string | null;
131
+ runtimeVersion: string | null;
132
+ };
133
+ selection: {
134
+ parameters: Record<string, unknown>;
135
+ capabilities: string[];
136
+ model: string | null;
137
+ };
138
+ usage: Record<string, unknown>[];
139
+ availability: "available" | "unavailable" | "partial";
140
+ identityManifest: Record<string, unknown>;
141
+ contextManifest: Record<string, unknown>[];
142
+ timing: Record<string, unknown>;
143
+ traceEvents: Record<string, unknown>[];
144
+ fullPayload?: Record<string, unknown> | undefined;
145
+ }, {
146
+ resources: Record<string, unknown>;
147
+ reason: string | null;
148
+ provider: {
149
+ providerId: string | null;
150
+ executionProviderId: string | null;
151
+ runtimeVersion: string | null;
152
+ };
153
+ selection: {
154
+ parameters: Record<string, unknown>;
155
+ capabilities: string[];
156
+ model: string | null;
157
+ };
158
+ usage: Record<string, unknown>[];
159
+ availability: "available" | "unavailable" | "partial";
160
+ identityManifest: Record<string, unknown>;
161
+ contextManifest: Record<string, unknown>[];
162
+ timing: Record<string, unknown>;
163
+ traceEvents: Record<string, unknown>[];
164
+ fullPayload?: Record<string, unknown> | undefined;
165
+ }>;
28
166
  export declare const communicationTargetSchema: z.ZodObject<{
29
167
  projectId: z.ZodString;
30
168
  agentSlug: z.ZodString;
@@ -78,10 +216,10 @@ export declare const communicationTargetSchema: z.ZodObject<{
78
216
  returnedAt: z.ZodNullable<z.ZodString>;
79
217
  failedAt: z.ZodNullable<z.ZodString>;
80
218
  }, "strict", z.ZodTypeAny, {
219
+ assignmentId: string | null;
81
220
  status: string | null;
82
221
  completedAt: string | null;
83
222
  providerId: string | null;
84
- assignmentId: string | null;
85
223
  executionProviderId: string | null;
86
224
  laneId: string | null;
87
225
  lanePurpose: string | null;
@@ -90,10 +228,10 @@ export declare const communicationTargetSchema: z.ZodObject<{
90
228
  returnedAt: string | null;
91
229
  failedAt: string | null;
92
230
  }, {
231
+ assignmentId: string | null;
93
232
  status: string | null;
94
233
  completedAt: string | null;
95
234
  providerId: string | null;
96
- assignmentId: string | null;
97
235
  executionProviderId: string | null;
98
236
  laneId: string | null;
99
237
  lanePurpose: string | null;
@@ -102,16 +240,96 @@ export declare const communicationTargetSchema: z.ZodObject<{
102
240
  returnedAt: string | null;
103
241
  failedAt: string | null;
104
242
  }>;
243
+ acknowledgedAt: z.ZodNullable<z.ZodString>;
244
+ leaseAcceptedAt: z.ZodNullable<z.ZodString>;
245
+ diagnostics: z.ZodObject<{
246
+ availability: z.ZodEnum<["available", "partial", "unavailable"]>;
247
+ reason: z.ZodNullable<z.ZodString>;
248
+ provider: z.ZodObject<{
249
+ providerId: z.ZodNullable<z.ZodString>;
250
+ executionProviderId: z.ZodNullable<z.ZodString>;
251
+ runtimeVersion: z.ZodNullable<z.ZodString>;
252
+ }, "strict", z.ZodTypeAny, {
253
+ providerId: string | null;
254
+ executionProviderId: string | null;
255
+ runtimeVersion: string | null;
256
+ }, {
257
+ providerId: string | null;
258
+ executionProviderId: string | null;
259
+ runtimeVersion: string | null;
260
+ }>;
261
+ selection: z.ZodObject<{
262
+ model: z.ZodNullable<z.ZodString>;
263
+ capabilities: z.ZodArray<z.ZodString, "many">;
264
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
265
+ }, "strict", z.ZodTypeAny, {
266
+ parameters: Record<string, unknown>;
267
+ capabilities: string[];
268
+ model: string | null;
269
+ }, {
270
+ parameters: Record<string, unknown>;
271
+ capabilities: string[];
272
+ model: string | null;
273
+ }>;
274
+ identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
275
+ contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
276
+ usage: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
277
+ timing: z.ZodRecord<z.ZodString, z.ZodUnknown>;
278
+ resources: z.ZodRecord<z.ZodString, z.ZodUnknown>;
279
+ traceEvents: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
280
+ fullPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
281
+ }, "strict", z.ZodTypeAny, {
282
+ resources: Record<string, unknown>;
283
+ reason: string | null;
284
+ provider: {
285
+ providerId: string | null;
286
+ executionProviderId: string | null;
287
+ runtimeVersion: string | null;
288
+ };
289
+ selection: {
290
+ parameters: Record<string, unknown>;
291
+ capabilities: string[];
292
+ model: string | null;
293
+ };
294
+ usage: Record<string, unknown>[];
295
+ availability: "available" | "unavailable" | "partial";
296
+ identityManifest: Record<string, unknown>;
297
+ contextManifest: Record<string, unknown>[];
298
+ timing: Record<string, unknown>;
299
+ traceEvents: Record<string, unknown>[];
300
+ fullPayload?: Record<string, unknown> | undefined;
301
+ }, {
302
+ resources: Record<string, unknown>;
303
+ reason: string | null;
304
+ provider: {
305
+ providerId: string | null;
306
+ executionProviderId: string | null;
307
+ runtimeVersion: string | null;
308
+ };
309
+ selection: {
310
+ parameters: Record<string, unknown>;
311
+ capabilities: string[];
312
+ model: string | null;
313
+ };
314
+ usage: Record<string, unknown>[];
315
+ availability: "available" | "unavailable" | "partial";
316
+ identityManifest: Record<string, unknown>;
317
+ contextManifest: Record<string, unknown>[];
318
+ timing: Record<string, unknown>;
319
+ traceEvents: Record<string, unknown>[];
320
+ fullPayload?: Record<string, unknown> | undefined;
321
+ }>;
105
322
  }, "strict", z.ZodTypeAny, {
323
+ invocationId: string | null;
106
324
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
107
325
  projectId: string;
108
326
  completedAt: string | null;
109
327
  agentSlug: string;
110
328
  capacity: {
329
+ assignmentId: string | null;
111
330
  status: string | null;
112
331
  completedAt: string | null;
113
332
  providerId: string | null;
114
- assignmentId: string | null;
115
333
  executionProviderId: string | null;
116
334
  laneId: string | null;
117
335
  lanePurpose: string | null;
@@ -120,6 +338,27 @@ export declare const communicationTargetSchema: z.ZodObject<{
120
338
  returnedAt: string | null;
121
339
  failedAt: string | null;
122
340
  };
341
+ diagnostics: {
342
+ resources: Record<string, unknown>;
343
+ reason: string | null;
344
+ provider: {
345
+ providerId: string | null;
346
+ executionProviderId: string | null;
347
+ runtimeVersion: string | null;
348
+ };
349
+ selection: {
350
+ parameters: Record<string, unknown>;
351
+ capabilities: string[];
352
+ model: string | null;
353
+ };
354
+ usage: Record<string, unknown>[];
355
+ availability: "available" | "unavailable" | "partial";
356
+ identityManifest: Record<string, unknown>;
357
+ contextManifest: Record<string, unknown>[];
358
+ timing: Record<string, unknown>;
359
+ traceEvents: Record<string, unknown>[];
360
+ fullPayload?: Record<string, unknown> | undefined;
361
+ };
123
362
  projectSlug: string;
124
363
  definitionRevision: string;
125
364
  revisions: {
@@ -128,7 +367,6 @@ export declare const communicationTargetSchema: z.ZodObject<{
128
367
  agentDefinition: string;
129
368
  chatProfile: string;
130
369
  };
131
- invocationId: string | null;
132
370
  requirement: "required" | "optional";
133
371
  parentInvocationId: string | null;
134
372
  depth: number;
@@ -138,16 +376,19 @@ export declare const communicationTargetSchema: z.ZodObject<{
138
376
  code: string;
139
377
  message: string | null;
140
378
  } | null;
379
+ acknowledgedAt: string | null;
380
+ leaseAcceptedAt: string | null;
141
381
  }, {
382
+ invocationId: string | null;
142
383
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
143
384
  projectId: string;
144
385
  completedAt: string | null;
145
386
  agentSlug: string;
146
387
  capacity: {
388
+ assignmentId: string | null;
147
389
  status: string | null;
148
390
  completedAt: string | null;
149
391
  providerId: string | null;
150
- assignmentId: string | null;
151
392
  executionProviderId: string | null;
152
393
  laneId: string | null;
153
394
  lanePurpose: string | null;
@@ -156,6 +397,27 @@ export declare const communicationTargetSchema: z.ZodObject<{
156
397
  returnedAt: string | null;
157
398
  failedAt: string | null;
158
399
  };
400
+ diagnostics: {
401
+ resources: Record<string, unknown>;
402
+ reason: string | null;
403
+ provider: {
404
+ providerId: string | null;
405
+ executionProviderId: string | null;
406
+ runtimeVersion: string | null;
407
+ };
408
+ selection: {
409
+ parameters: Record<string, unknown>;
410
+ capabilities: string[];
411
+ model: string | null;
412
+ };
413
+ usage: Record<string, unknown>[];
414
+ availability: "available" | "unavailable" | "partial";
415
+ identityManifest: Record<string, unknown>;
416
+ contextManifest: Record<string, unknown>[];
417
+ timing: Record<string, unknown>;
418
+ traceEvents: Record<string, unknown>[];
419
+ fullPayload?: Record<string, unknown> | undefined;
420
+ };
159
421
  projectSlug: string;
160
422
  definitionRevision: string;
161
423
  revisions: {
@@ -164,7 +426,6 @@ export declare const communicationTargetSchema: z.ZodObject<{
164
426
  agentDefinition: string;
165
427
  chatProfile: string;
166
428
  };
167
- invocationId: string | null;
168
429
  requirement: "required" | "optional";
169
430
  parentInvocationId: string | null;
170
431
  depth: number;
@@ -174,11 +435,14 @@ export declare const communicationTargetSchema: z.ZodObject<{
174
435
  code: string;
175
436
  message: string | null;
176
437
  } | null;
438
+ acknowledgedAt: string | null;
439
+ leaseAcceptedAt: string | null;
177
440
  }>;
178
441
  export declare const communicationResponseSchema: z.ZodObject<{
179
442
  projectId: z.ZodString;
180
443
  agentSlug: z.ZodString;
181
444
  } & {
445
+ projectSlug: z.ZodString;
182
446
  invocationId: z.ZodString;
183
447
  assignmentId: z.ZodNullable<z.ZodString>;
184
448
  messageRef: z.ZodString;
@@ -187,28 +451,30 @@ export declare const communicationResponseSchema: z.ZodObject<{
187
451
  status: z.ZodEnum<["responded", "abstained", "failed", "cancelled"]>;
188
452
  createdAt: z.ZodString;
189
453
  }, "strict", z.ZodTypeAny, {
454
+ invocationId: string;
455
+ assignmentId: string | null;
190
456
  status: "failed" | "cancelled" | "responded" | "abstained";
191
- projectId: string;
192
457
  createdAt: string;
458
+ projectId: string;
193
459
  agentSlug: string;
194
- assignmentId: string | null;
195
- invocationId: string;
460
+ projectSlug: string;
196
461
  requirement: "required" | "optional";
197
462
  messageRef: string;
198
463
  markdown: string;
199
464
  }, {
465
+ invocationId: string;
466
+ assignmentId: string | null;
200
467
  status: "failed" | "cancelled" | "responded" | "abstained";
201
- projectId: string;
202
468
  createdAt: string;
469
+ projectId: string;
203
470
  agentSlug: string;
204
- assignmentId: string | null;
205
- invocationId: string;
471
+ projectSlug: string;
206
472
  requirement: "required" | "optional";
207
473
  messageRef: string;
208
474
  markdown: string;
209
475
  }>;
210
476
  export declare const communicationSendReceiptSchema: z.ZodObject<{
211
- schemaVersion: z.ZodLiteral<"treeseed.communication-send-receipt/v2">;
477
+ schemaVersion: z.ZodLiteral<"treeseed.communication-send-receipt/v4">;
212
478
  sendId: z.ZodString;
213
479
  teamId: z.ZodString;
214
480
  channel: z.ZodString;
@@ -222,22 +488,25 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
222
488
  id: string;
223
489
  slug: string;
224
490
  }>;
225
- projectStream: z.ZodObject<{
491
+ projectStreams: z.ZodArray<z.ZodObject<{
226
492
  id: z.ZodString;
227
493
  projectId: z.ZodString;
228
494
  projectSlug: z.ZodString;
495
+ discussionId: z.ZodString;
496
+ messageRef: z.ZodString;
229
497
  }, "strict", z.ZodTypeAny, {
230
498
  id: string;
231
499
  projectId: string;
232
500
  projectSlug: string;
501
+ messageRef: string;
502
+ discussionId: string;
233
503
  }, {
234
504
  id: string;
235
505
  projectId: string;
236
506
  projectSlug: string;
237
- }>;
238
- discussionId: z.ZodString;
239
- messageRef: z.ZodString;
240
- sourceMessage: z.ZodString;
507
+ messageRef: string;
508
+ discussionId: string;
509
+ }>, "many">;
241
510
  status: z.ZodEnum<["queued", "running", "complete", "partial", "failed"]>;
242
511
  targets: z.ZodArray<z.ZodObject<{
243
512
  projectId: z.ZodString;
@@ -292,10 +561,10 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
292
561
  returnedAt: z.ZodNullable<z.ZodString>;
293
562
  failedAt: z.ZodNullable<z.ZodString>;
294
563
  }, "strict", z.ZodTypeAny, {
564
+ assignmentId: string | null;
295
565
  status: string | null;
296
566
  completedAt: string | null;
297
567
  providerId: string | null;
298
- assignmentId: string | null;
299
568
  executionProviderId: string | null;
300
569
  laneId: string | null;
301
570
  lanePurpose: string | null;
@@ -304,10 +573,10 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
304
573
  returnedAt: string | null;
305
574
  failedAt: string | null;
306
575
  }, {
576
+ assignmentId: string | null;
307
577
  status: string | null;
308
578
  completedAt: string | null;
309
579
  providerId: string | null;
310
- assignmentId: string | null;
311
580
  executionProviderId: string | null;
312
581
  laneId: string | null;
313
582
  lanePurpose: string | null;
@@ -316,16 +585,96 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
316
585
  returnedAt: string | null;
317
586
  failedAt: string | null;
318
587
  }>;
588
+ acknowledgedAt: z.ZodNullable<z.ZodString>;
589
+ leaseAcceptedAt: z.ZodNullable<z.ZodString>;
590
+ diagnostics: z.ZodObject<{
591
+ availability: z.ZodEnum<["available", "partial", "unavailable"]>;
592
+ reason: z.ZodNullable<z.ZodString>;
593
+ provider: z.ZodObject<{
594
+ providerId: z.ZodNullable<z.ZodString>;
595
+ executionProviderId: z.ZodNullable<z.ZodString>;
596
+ runtimeVersion: z.ZodNullable<z.ZodString>;
597
+ }, "strict", z.ZodTypeAny, {
598
+ providerId: string | null;
599
+ executionProviderId: string | null;
600
+ runtimeVersion: string | null;
601
+ }, {
602
+ providerId: string | null;
603
+ executionProviderId: string | null;
604
+ runtimeVersion: string | null;
605
+ }>;
606
+ selection: z.ZodObject<{
607
+ model: z.ZodNullable<z.ZodString>;
608
+ capabilities: z.ZodArray<z.ZodString, "many">;
609
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
610
+ }, "strict", z.ZodTypeAny, {
611
+ parameters: Record<string, unknown>;
612
+ capabilities: string[];
613
+ model: string | null;
614
+ }, {
615
+ parameters: Record<string, unknown>;
616
+ capabilities: string[];
617
+ model: string | null;
618
+ }>;
619
+ identityManifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
620
+ contextManifest: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
621
+ usage: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
622
+ timing: z.ZodRecord<z.ZodString, z.ZodUnknown>;
623
+ resources: z.ZodRecord<z.ZodString, z.ZodUnknown>;
624
+ traceEvents: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
625
+ fullPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
626
+ }, "strict", z.ZodTypeAny, {
627
+ resources: Record<string, unknown>;
628
+ reason: string | null;
629
+ provider: {
630
+ providerId: string | null;
631
+ executionProviderId: string | null;
632
+ runtimeVersion: string | null;
633
+ };
634
+ selection: {
635
+ parameters: Record<string, unknown>;
636
+ capabilities: string[];
637
+ model: string | null;
638
+ };
639
+ usage: Record<string, unknown>[];
640
+ availability: "available" | "unavailable" | "partial";
641
+ identityManifest: Record<string, unknown>;
642
+ contextManifest: Record<string, unknown>[];
643
+ timing: Record<string, unknown>;
644
+ traceEvents: Record<string, unknown>[];
645
+ fullPayload?: Record<string, unknown> | undefined;
646
+ }, {
647
+ resources: Record<string, unknown>;
648
+ reason: string | null;
649
+ provider: {
650
+ providerId: string | null;
651
+ executionProviderId: string | null;
652
+ runtimeVersion: string | null;
653
+ };
654
+ selection: {
655
+ parameters: Record<string, unknown>;
656
+ capabilities: string[];
657
+ model: string | null;
658
+ };
659
+ usage: Record<string, unknown>[];
660
+ availability: "available" | "unavailable" | "partial";
661
+ identityManifest: Record<string, unknown>;
662
+ contextManifest: Record<string, unknown>[];
663
+ timing: Record<string, unknown>;
664
+ traceEvents: Record<string, unknown>[];
665
+ fullPayload?: Record<string, unknown> | undefined;
666
+ }>;
319
667
  }, "strict", z.ZodTypeAny, {
668
+ invocationId: string | null;
320
669
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
321
670
  projectId: string;
322
671
  completedAt: string | null;
323
672
  agentSlug: string;
324
673
  capacity: {
674
+ assignmentId: string | null;
325
675
  status: string | null;
326
676
  completedAt: string | null;
327
677
  providerId: string | null;
328
- assignmentId: string | null;
329
678
  executionProviderId: string | null;
330
679
  laneId: string | null;
331
680
  lanePurpose: string | null;
@@ -334,6 +683,27 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
334
683
  returnedAt: string | null;
335
684
  failedAt: string | null;
336
685
  };
686
+ diagnostics: {
687
+ resources: Record<string, unknown>;
688
+ reason: string | null;
689
+ provider: {
690
+ providerId: string | null;
691
+ executionProviderId: string | null;
692
+ runtimeVersion: string | null;
693
+ };
694
+ selection: {
695
+ parameters: Record<string, unknown>;
696
+ capabilities: string[];
697
+ model: string | null;
698
+ };
699
+ usage: Record<string, unknown>[];
700
+ availability: "available" | "unavailable" | "partial";
701
+ identityManifest: Record<string, unknown>;
702
+ contextManifest: Record<string, unknown>[];
703
+ timing: Record<string, unknown>;
704
+ traceEvents: Record<string, unknown>[];
705
+ fullPayload?: Record<string, unknown> | undefined;
706
+ };
337
707
  projectSlug: string;
338
708
  definitionRevision: string;
339
709
  revisions: {
@@ -342,7 +712,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
342
712
  agentDefinition: string;
343
713
  chatProfile: string;
344
714
  };
345
- invocationId: string | null;
346
715
  requirement: "required" | "optional";
347
716
  parentInvocationId: string | null;
348
717
  depth: number;
@@ -352,16 +721,19 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
352
721
  code: string;
353
722
  message: string | null;
354
723
  } | null;
724
+ acknowledgedAt: string | null;
725
+ leaseAcceptedAt: string | null;
355
726
  }, {
727
+ invocationId: string | null;
356
728
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
357
729
  projectId: string;
358
730
  completedAt: string | null;
359
731
  agentSlug: string;
360
732
  capacity: {
733
+ assignmentId: string | null;
361
734
  status: string | null;
362
735
  completedAt: string | null;
363
736
  providerId: string | null;
364
- assignmentId: string | null;
365
737
  executionProviderId: string | null;
366
738
  laneId: string | null;
367
739
  lanePurpose: string | null;
@@ -370,6 +742,27 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
370
742
  returnedAt: string | null;
371
743
  failedAt: string | null;
372
744
  };
745
+ diagnostics: {
746
+ resources: Record<string, unknown>;
747
+ reason: string | null;
748
+ provider: {
749
+ providerId: string | null;
750
+ executionProviderId: string | null;
751
+ runtimeVersion: string | null;
752
+ };
753
+ selection: {
754
+ parameters: Record<string, unknown>;
755
+ capabilities: string[];
756
+ model: string | null;
757
+ };
758
+ usage: Record<string, unknown>[];
759
+ availability: "available" | "unavailable" | "partial";
760
+ identityManifest: Record<string, unknown>;
761
+ contextManifest: Record<string, unknown>[];
762
+ timing: Record<string, unknown>;
763
+ traceEvents: Record<string, unknown>[];
764
+ fullPayload?: Record<string, unknown> | undefined;
765
+ };
373
766
  projectSlug: string;
374
767
  definitionRevision: string;
375
768
  revisions: {
@@ -378,7 +771,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
378
771
  agentDefinition: string;
379
772
  chatProfile: string;
380
773
  };
381
- invocationId: string | null;
382
774
  requirement: "required" | "optional";
383
775
  parentInvocationId: string | null;
384
776
  depth: number;
@@ -388,11 +780,14 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
388
780
  code: string;
389
781
  message: string | null;
390
782
  } | null;
783
+ acknowledgedAt: string | null;
784
+ leaseAcceptedAt: string | null;
391
785
  }>, "many">;
392
786
  responses: z.ZodArray<z.ZodObject<{
393
787
  projectId: z.ZodString;
394
788
  agentSlug: z.ZodString;
395
789
  } & {
790
+ projectSlug: z.ZodString;
396
791
  invocationId: z.ZodString;
397
792
  assignmentId: z.ZodNullable<z.ZodString>;
398
793
  messageRef: z.ZodString;
@@ -401,42 +796,111 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
401
796
  status: z.ZodEnum<["responded", "abstained", "failed", "cancelled"]>;
402
797
  createdAt: z.ZodString;
403
798
  }, "strict", z.ZodTypeAny, {
799
+ invocationId: string;
800
+ assignmentId: string | null;
404
801
  status: "failed" | "cancelled" | "responded" | "abstained";
405
- projectId: string;
406
802
  createdAt: string;
803
+ projectId: string;
407
804
  agentSlug: string;
408
- assignmentId: string | null;
409
- invocationId: string;
805
+ projectSlug: string;
410
806
  requirement: "required" | "optional";
411
807
  messageRef: string;
412
808
  markdown: string;
413
809
  }, {
810
+ invocationId: string;
811
+ assignmentId: string | null;
414
812
  status: "failed" | "cancelled" | "responded" | "abstained";
415
- projectId: string;
416
813
  createdAt: string;
814
+ projectId: string;
417
815
  agentSlug: string;
418
- assignmentId: string | null;
419
- invocationId: string;
816
+ projectSlug: string;
420
817
  requirement: "required" | "optional";
421
818
  messageRef: string;
422
819
  markdown: string;
423
820
  }>, "many">;
821
+ events: z.ZodArray<z.ZodObject<{
822
+ id: z.ZodString;
823
+ sequence: z.ZodNumber;
824
+ teamId: z.ZodString;
825
+ topicId: z.ZodString;
826
+ channel: z.ZodString;
827
+ type: z.ZodEnum<["message.posted", "mention.acknowledged", "response_lease.accepted", "agent.progress", "agent.response", "agent.abstained", "agent.failed"]>;
828
+ occurredAt: z.ZodString;
829
+ sendId: z.ZodNullable<z.ZodString>;
830
+ invocationId: z.ZodNullable<z.ZodString>;
831
+ assignmentId: z.ZodNullable<z.ZodString>;
832
+ actor: z.ZodObject<{
833
+ kind: z.ZodEnum<["user", "agent", "provider", "control-plane"]>;
834
+ id: z.ZodString;
835
+ handle: z.ZodNullable<z.ZodString>;
836
+ }, "strict", z.ZodTypeAny, {
837
+ kind: "control-plane" | "provider" | "agent" | "user";
838
+ id: string;
839
+ handle: string | null;
840
+ }, {
841
+ kind: "control-plane" | "provider" | "agent" | "user";
842
+ id: string;
843
+ handle: string | null;
844
+ }>;
845
+ summary: z.ZodString;
846
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
847
+ }, "strict", z.ZodTypeAny, {
848
+ teamId: string;
849
+ topicId: string;
850
+ sendId: string | null;
851
+ invocationId: string | null;
852
+ assignmentId: string | null;
853
+ sequence: number;
854
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
855
+ payload: Record<string, unknown>;
856
+ id: string;
857
+ actor: {
858
+ kind: "control-plane" | "provider" | "agent" | "user";
859
+ id: string;
860
+ handle: string | null;
861
+ };
862
+ summary: string;
863
+ channel: string;
864
+ occurredAt: string;
865
+ }, {
866
+ teamId: string;
867
+ topicId: string;
868
+ sendId: string | null;
869
+ invocationId: string | null;
870
+ assignmentId: string | null;
871
+ sequence: number;
872
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
873
+ payload: Record<string, unknown>;
874
+ id: string;
875
+ actor: {
876
+ kind: "control-plane" | "provider" | "agent" | "user";
877
+ id: string;
878
+ handle: string | null;
879
+ };
880
+ summary: string;
881
+ channel: string;
882
+ occurredAt: string;
883
+ }>, "many">;
424
884
  createdAt: z.ZodString;
425
885
  updatedAt: z.ZodString;
426
886
  replayed: z.ZodBoolean;
427
887
  }, "strict", z.ZodTypeAny, {
888
+ teamId: string;
889
+ sendId: string;
890
+ schemaVersion: "treeseed.communication-send-receipt/v4";
428
891
  status: "failed" | "running" | "partial" | "complete" | "queued";
429
- schemaVersion: "treeseed.communication-send-receipt/v2";
892
+ createdAt: string;
430
893
  targets: {
894
+ invocationId: string | null;
431
895
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
432
896
  projectId: string;
433
897
  completedAt: string | null;
434
898
  agentSlug: string;
435
899
  capacity: {
900
+ assignmentId: string | null;
436
901
  status: string | null;
437
902
  completedAt: string | null;
438
903
  providerId: string | null;
439
- assignmentId: string | null;
440
904
  executionProviderId: string | null;
441
905
  laneId: string | null;
442
906
  lanePurpose: string | null;
@@ -445,6 +909,27 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
445
909
  returnedAt: string | null;
446
910
  failedAt: string | null;
447
911
  };
912
+ diagnostics: {
913
+ resources: Record<string, unknown>;
914
+ reason: string | null;
915
+ provider: {
916
+ providerId: string | null;
917
+ executionProviderId: string | null;
918
+ runtimeVersion: string | null;
919
+ };
920
+ selection: {
921
+ parameters: Record<string, unknown>;
922
+ capabilities: string[];
923
+ model: string | null;
924
+ };
925
+ usage: Record<string, unknown>[];
926
+ availability: "available" | "unavailable" | "partial";
927
+ identityManifest: Record<string, unknown>;
928
+ contextManifest: Record<string, unknown>[];
929
+ timing: Record<string, unknown>;
930
+ traceEvents: Record<string, unknown>[];
931
+ fullPayload?: Record<string, unknown> | undefined;
932
+ };
448
933
  projectSlug: string;
449
934
  definitionRevision: string;
450
935
  revisions: {
@@ -453,7 +938,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
453
938
  agentDefinition: string;
454
939
  chatProfile: string;
455
940
  };
456
- invocationId: string | null;
457
941
  requirement: "required" | "optional";
458
942
  parentInvocationId: string | null;
459
943
  depth: number;
@@ -463,49 +947,71 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
463
947
  code: string;
464
948
  message: string | null;
465
949
  } | null;
950
+ acknowledgedAt: string | null;
951
+ leaseAcceptedAt: string | null;
466
952
  }[];
467
- createdAt: string;
468
953
  responses: {
954
+ invocationId: string;
955
+ assignmentId: string | null;
469
956
  status: "failed" | "cancelled" | "responded" | "abstained";
470
- projectId: string;
471
957
  createdAt: string;
958
+ projectId: string;
472
959
  agentSlug: string;
473
- assignmentId: string | null;
474
- invocationId: string;
960
+ projectSlug: string;
475
961
  requirement: "required" | "optional";
476
962
  messageRef: string;
477
963
  markdown: string;
478
964
  }[];
479
- teamId: string;
480
965
  channel: string;
481
- updatedAt: string;
482
- messageRef: string;
483
- sendId: string;
484
966
  topic: {
485
967
  id: string;
486
968
  slug: string;
487
969
  };
488
- projectStream: {
970
+ events: {
971
+ teamId: string;
972
+ topicId: string;
973
+ sendId: string | null;
974
+ invocationId: string | null;
975
+ assignmentId: string | null;
976
+ sequence: number;
977
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
978
+ payload: Record<string, unknown>;
979
+ id: string;
980
+ actor: {
981
+ kind: "control-plane" | "provider" | "agent" | "user";
982
+ id: string;
983
+ handle: string | null;
984
+ };
985
+ summary: string;
986
+ channel: string;
987
+ occurredAt: string;
988
+ }[];
989
+ updatedAt: string;
990
+ projectStreams: {
489
991
  id: string;
490
992
  projectId: string;
491
993
  projectSlug: string;
492
- };
493
- discussionId: string;
494
- sourceMessage: string;
994
+ messageRef: string;
995
+ discussionId: string;
996
+ }[];
495
997
  replayed: boolean;
496
998
  }, {
999
+ teamId: string;
1000
+ sendId: string;
1001
+ schemaVersion: "treeseed.communication-send-receipt/v4";
497
1002
  status: "failed" | "running" | "partial" | "complete" | "queued";
498
- schemaVersion: "treeseed.communication-send-receipt/v2";
1003
+ createdAt: string;
499
1004
  targets: {
1005
+ invocationId: string | null;
500
1006
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
501
1007
  projectId: string;
502
1008
  completedAt: string | null;
503
1009
  agentSlug: string;
504
1010
  capacity: {
1011
+ assignmentId: string | null;
505
1012
  status: string | null;
506
1013
  completedAt: string | null;
507
1014
  providerId: string | null;
508
- assignmentId: string | null;
509
1015
  executionProviderId: string | null;
510
1016
  laneId: string | null;
511
1017
  lanePurpose: string | null;
@@ -514,6 +1020,27 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
514
1020
  returnedAt: string | null;
515
1021
  failedAt: string | null;
516
1022
  };
1023
+ diagnostics: {
1024
+ resources: Record<string, unknown>;
1025
+ reason: string | null;
1026
+ provider: {
1027
+ providerId: string | null;
1028
+ executionProviderId: string | null;
1029
+ runtimeVersion: string | null;
1030
+ };
1031
+ selection: {
1032
+ parameters: Record<string, unknown>;
1033
+ capabilities: string[];
1034
+ model: string | null;
1035
+ };
1036
+ usage: Record<string, unknown>[];
1037
+ availability: "available" | "unavailable" | "partial";
1038
+ identityManifest: Record<string, unknown>;
1039
+ contextManifest: Record<string, unknown>[];
1040
+ timing: Record<string, unknown>;
1041
+ traceEvents: Record<string, unknown>[];
1042
+ fullPayload?: Record<string, unknown> | undefined;
1043
+ };
517
1044
  projectSlug: string;
518
1045
  definitionRevision: string;
519
1046
  revisions: {
@@ -522,7 +1049,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
522
1049
  agentDefinition: string;
523
1050
  chatProfile: string;
524
1051
  };
525
- invocationId: string | null;
526
1052
  requirement: "required" | "optional";
527
1053
  parentInvocationId: string | null;
528
1054
  depth: number;
@@ -532,36 +1058,698 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
532
1058
  code: string;
533
1059
  message: string | null;
534
1060
  } | null;
1061
+ acknowledgedAt: string | null;
1062
+ leaseAcceptedAt: string | null;
535
1063
  }[];
536
- createdAt: string;
537
1064
  responses: {
1065
+ invocationId: string;
1066
+ assignmentId: string | null;
538
1067
  status: "failed" | "cancelled" | "responded" | "abstained";
539
- projectId: string;
540
1068
  createdAt: string;
1069
+ projectId: string;
541
1070
  agentSlug: string;
542
- assignmentId: string | null;
543
- invocationId: string;
1071
+ projectSlug: string;
544
1072
  requirement: "required" | "optional";
545
1073
  messageRef: string;
546
1074
  markdown: string;
547
1075
  }[];
548
- teamId: string;
549
1076
  channel: string;
1077
+ topic: {
1078
+ id: string;
1079
+ slug: string;
1080
+ };
1081
+ events: {
1082
+ teamId: string;
1083
+ topicId: string;
1084
+ sendId: string | null;
1085
+ invocationId: string | null;
1086
+ assignmentId: string | null;
1087
+ sequence: number;
1088
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1089
+ payload: Record<string, unknown>;
1090
+ id: string;
1091
+ actor: {
1092
+ kind: "control-plane" | "provider" | "agent" | "user";
1093
+ id: string;
1094
+ handle: string | null;
1095
+ };
1096
+ summary: string;
1097
+ channel: string;
1098
+ occurredAt: string;
1099
+ }[];
550
1100
  updatedAt: string;
551
- messageRef: string;
552
- sendId: string;
1101
+ projectStreams: {
1102
+ id: string;
1103
+ projectId: string;
1104
+ projectSlug: string;
1105
+ messageRef: string;
1106
+ discussionId: string;
1107
+ }[];
1108
+ replayed: boolean;
1109
+ }>;
1110
+ export declare const communicationTopicListenerSchema: z.ZodObject<{
1111
+ projectId: z.ZodString;
1112
+ agentSlug: z.ZodString;
1113
+ } & {
1114
+ projectSlug: z.ZodString;
1115
+ agentHandle: z.ZodString;
1116
+ status: z.ZodEnum<["active", "removed"]>;
1117
+ subscribedAt: z.ZodString;
1118
+ updatedAt: z.ZodString;
1119
+ source: z.ZodEnum<["mention", "operator", "seed"]>;
1120
+ }, "strict", z.ZodTypeAny, {
1121
+ status: "active" | "removed";
1122
+ projectId: string;
1123
+ source: "operator" | "seed" | "mention";
1124
+ agentSlug: string;
1125
+ projectSlug: string;
1126
+ updatedAt: string;
1127
+ agentHandle: string;
1128
+ subscribedAt: string;
1129
+ }, {
1130
+ status: "active" | "removed";
1131
+ projectId: string;
1132
+ source: "operator" | "seed" | "mention";
1133
+ agentSlug: string;
1134
+ projectSlug: string;
1135
+ updatedAt: string;
1136
+ agentHandle: string;
1137
+ subscribedAt: string;
1138
+ }>;
1139
+ export declare const communicationTopicSchema: z.ZodObject<{
1140
+ id: z.ZodString;
1141
+ teamId: z.ZodString;
1142
+ slug: z.ZodString;
1143
+ status: z.ZodEnum<["active", "archived"]>;
1144
+ createdAt: z.ZodString;
1145
+ updatedAt: z.ZodString;
1146
+ streams: z.ZodArray<z.ZodObject<{
1147
+ id: z.ZodString;
1148
+ projectId: z.ZodString;
1149
+ projectSlug: z.ZodString;
1150
+ discussionId: z.ZodString;
1151
+ }, "strict", z.ZodTypeAny, {
1152
+ id: string;
1153
+ projectId: string;
1154
+ projectSlug: string;
1155
+ discussionId: string;
1156
+ }, {
1157
+ id: string;
1158
+ projectId: string;
1159
+ projectSlug: string;
1160
+ discussionId: string;
1161
+ }>, "many">;
1162
+ listeners: z.ZodArray<z.ZodObject<{
1163
+ projectId: z.ZodString;
1164
+ agentSlug: z.ZodString;
1165
+ } & {
1166
+ projectSlug: z.ZodString;
1167
+ agentHandle: z.ZodString;
1168
+ status: z.ZodEnum<["active", "removed"]>;
1169
+ subscribedAt: z.ZodString;
1170
+ updatedAt: z.ZodString;
1171
+ source: z.ZodEnum<["mention", "operator", "seed"]>;
1172
+ }, "strict", z.ZodTypeAny, {
1173
+ status: "active" | "removed";
1174
+ projectId: string;
1175
+ source: "operator" | "seed" | "mention";
1176
+ agentSlug: string;
1177
+ projectSlug: string;
1178
+ updatedAt: string;
1179
+ agentHandle: string;
1180
+ subscribedAt: string;
1181
+ }, {
1182
+ status: "active" | "removed";
1183
+ projectId: string;
1184
+ source: "operator" | "seed" | "mention";
1185
+ agentSlug: string;
1186
+ projectSlug: string;
1187
+ updatedAt: string;
1188
+ agentHandle: string;
1189
+ subscribedAt: string;
1190
+ }>, "many">;
1191
+ }, "strict", z.ZodTypeAny, {
1192
+ teamId: string;
1193
+ status: "active" | "archived";
1194
+ createdAt: string;
1195
+ id: string;
1196
+ updatedAt: string;
1197
+ slug: string;
1198
+ streams: {
1199
+ id: string;
1200
+ projectId: string;
1201
+ projectSlug: string;
1202
+ discussionId: string;
1203
+ }[];
1204
+ listeners: {
1205
+ status: "active" | "removed";
1206
+ projectId: string;
1207
+ source: "operator" | "seed" | "mention";
1208
+ agentSlug: string;
1209
+ projectSlug: string;
1210
+ updatedAt: string;
1211
+ agentHandle: string;
1212
+ subscribedAt: string;
1213
+ }[];
1214
+ }, {
1215
+ teamId: string;
1216
+ status: "active" | "archived";
1217
+ createdAt: string;
1218
+ id: string;
1219
+ updatedAt: string;
1220
+ slug: string;
1221
+ streams: {
1222
+ id: string;
1223
+ projectId: string;
1224
+ projectSlug: string;
1225
+ discussionId: string;
1226
+ }[];
1227
+ listeners: {
1228
+ status: "active" | "removed";
1229
+ projectId: string;
1230
+ source: "operator" | "seed" | "mention";
1231
+ agentSlug: string;
1232
+ projectSlug: string;
1233
+ updatedAt: string;
1234
+ agentHandle: string;
1235
+ subscribedAt: string;
1236
+ }[];
1237
+ }>;
1238
+ export declare const communicationTopicPageSchema: z.ZodObject<{
1239
+ items: z.ZodArray<z.ZodObject<{
1240
+ id: z.ZodString;
1241
+ teamId: z.ZodString;
1242
+ slug: z.ZodString;
1243
+ status: z.ZodEnum<["active", "archived"]>;
1244
+ createdAt: z.ZodString;
1245
+ updatedAt: z.ZodString;
1246
+ streams: z.ZodArray<z.ZodObject<{
1247
+ id: z.ZodString;
1248
+ projectId: z.ZodString;
1249
+ projectSlug: z.ZodString;
1250
+ discussionId: z.ZodString;
1251
+ }, "strict", z.ZodTypeAny, {
1252
+ id: string;
1253
+ projectId: string;
1254
+ projectSlug: string;
1255
+ discussionId: string;
1256
+ }, {
1257
+ id: string;
1258
+ projectId: string;
1259
+ projectSlug: string;
1260
+ discussionId: string;
1261
+ }>, "many">;
1262
+ listeners: z.ZodArray<z.ZodObject<{
1263
+ projectId: z.ZodString;
1264
+ agentSlug: z.ZodString;
1265
+ } & {
1266
+ projectSlug: z.ZodString;
1267
+ agentHandle: z.ZodString;
1268
+ status: z.ZodEnum<["active", "removed"]>;
1269
+ subscribedAt: z.ZodString;
1270
+ updatedAt: z.ZodString;
1271
+ source: z.ZodEnum<["mention", "operator", "seed"]>;
1272
+ }, "strict", z.ZodTypeAny, {
1273
+ status: "active" | "removed";
1274
+ projectId: string;
1275
+ source: "operator" | "seed" | "mention";
1276
+ agentSlug: string;
1277
+ projectSlug: string;
1278
+ updatedAt: string;
1279
+ agentHandle: string;
1280
+ subscribedAt: string;
1281
+ }, {
1282
+ status: "active" | "removed";
1283
+ projectId: string;
1284
+ source: "operator" | "seed" | "mention";
1285
+ agentSlug: string;
1286
+ projectSlug: string;
1287
+ updatedAt: string;
1288
+ agentHandle: string;
1289
+ subscribedAt: string;
1290
+ }>, "many">;
1291
+ }, "strict", z.ZodTypeAny, {
1292
+ teamId: string;
1293
+ status: "active" | "archived";
1294
+ createdAt: string;
1295
+ id: string;
1296
+ updatedAt: string;
1297
+ slug: string;
1298
+ streams: {
1299
+ id: string;
1300
+ projectId: string;
1301
+ projectSlug: string;
1302
+ discussionId: string;
1303
+ }[];
1304
+ listeners: {
1305
+ status: "active" | "removed";
1306
+ projectId: string;
1307
+ source: "operator" | "seed" | "mention";
1308
+ agentSlug: string;
1309
+ projectSlug: string;
1310
+ updatedAt: string;
1311
+ agentHandle: string;
1312
+ subscribedAt: string;
1313
+ }[];
1314
+ }, {
1315
+ teamId: string;
1316
+ status: "active" | "archived";
1317
+ createdAt: string;
1318
+ id: string;
1319
+ updatedAt: string;
1320
+ slug: string;
1321
+ streams: {
1322
+ id: string;
1323
+ projectId: string;
1324
+ projectSlug: string;
1325
+ discussionId: string;
1326
+ }[];
1327
+ listeners: {
1328
+ status: "active" | "removed";
1329
+ projectId: string;
1330
+ source: "operator" | "seed" | "mention";
1331
+ agentSlug: string;
1332
+ projectSlug: string;
1333
+ updatedAt: string;
1334
+ agentHandle: string;
1335
+ subscribedAt: string;
1336
+ }[];
1337
+ }>, "many">;
1338
+ cursor: z.ZodNullable<z.ZodString>;
1339
+ }, "strict", z.ZodTypeAny, {
1340
+ items: {
1341
+ teamId: string;
1342
+ status: "active" | "archived";
1343
+ createdAt: string;
1344
+ id: string;
1345
+ updatedAt: string;
1346
+ slug: string;
1347
+ streams: {
1348
+ id: string;
1349
+ projectId: string;
1350
+ projectSlug: string;
1351
+ discussionId: string;
1352
+ }[];
1353
+ listeners: {
1354
+ status: "active" | "removed";
1355
+ projectId: string;
1356
+ source: "operator" | "seed" | "mention";
1357
+ agentSlug: string;
1358
+ projectSlug: string;
1359
+ updatedAt: string;
1360
+ agentHandle: string;
1361
+ subscribedAt: string;
1362
+ }[];
1363
+ }[];
1364
+ cursor: string | null;
1365
+ }, {
1366
+ items: {
1367
+ teamId: string;
1368
+ status: "active" | "archived";
1369
+ createdAt: string;
1370
+ id: string;
1371
+ updatedAt: string;
1372
+ slug: string;
1373
+ streams: {
1374
+ id: string;
1375
+ projectId: string;
1376
+ projectSlug: string;
1377
+ discussionId: string;
1378
+ }[];
1379
+ listeners: {
1380
+ status: "active" | "removed";
1381
+ projectId: string;
1382
+ source: "operator" | "seed" | "mention";
1383
+ agentSlug: string;
1384
+ projectSlug: string;
1385
+ updatedAt: string;
1386
+ agentHandle: string;
1387
+ subscribedAt: string;
1388
+ }[];
1389
+ }[];
1390
+ cursor: string | null;
1391
+ }>;
1392
+ export declare const communicationTopicTimelineSchema: z.ZodObject<{
1393
+ topic: z.ZodObject<{
1394
+ id: z.ZodString;
1395
+ teamId: z.ZodString;
1396
+ slug: z.ZodString;
1397
+ status: z.ZodEnum<["active", "archived"]>;
1398
+ createdAt: z.ZodString;
1399
+ updatedAt: z.ZodString;
1400
+ streams: z.ZodArray<z.ZodObject<{
1401
+ id: z.ZodString;
1402
+ projectId: z.ZodString;
1403
+ projectSlug: z.ZodString;
1404
+ discussionId: z.ZodString;
1405
+ }, "strict", z.ZodTypeAny, {
1406
+ id: string;
1407
+ projectId: string;
1408
+ projectSlug: string;
1409
+ discussionId: string;
1410
+ }, {
1411
+ id: string;
1412
+ projectId: string;
1413
+ projectSlug: string;
1414
+ discussionId: string;
1415
+ }>, "many">;
1416
+ listeners: z.ZodArray<z.ZodObject<{
1417
+ projectId: z.ZodString;
1418
+ agentSlug: z.ZodString;
1419
+ } & {
1420
+ projectSlug: z.ZodString;
1421
+ agentHandle: z.ZodString;
1422
+ status: z.ZodEnum<["active", "removed"]>;
1423
+ subscribedAt: z.ZodString;
1424
+ updatedAt: z.ZodString;
1425
+ source: z.ZodEnum<["mention", "operator", "seed"]>;
1426
+ }, "strict", z.ZodTypeAny, {
1427
+ status: "active" | "removed";
1428
+ projectId: string;
1429
+ source: "operator" | "seed" | "mention";
1430
+ agentSlug: string;
1431
+ projectSlug: string;
1432
+ updatedAt: string;
1433
+ agentHandle: string;
1434
+ subscribedAt: string;
1435
+ }, {
1436
+ status: "active" | "removed";
1437
+ projectId: string;
1438
+ source: "operator" | "seed" | "mention";
1439
+ agentSlug: string;
1440
+ projectSlug: string;
1441
+ updatedAt: string;
1442
+ agentHandle: string;
1443
+ subscribedAt: string;
1444
+ }>, "many">;
1445
+ }, "strict", z.ZodTypeAny, {
1446
+ teamId: string;
1447
+ status: "active" | "archived";
1448
+ createdAt: string;
1449
+ id: string;
1450
+ updatedAt: string;
1451
+ slug: string;
1452
+ streams: {
1453
+ id: string;
1454
+ projectId: string;
1455
+ projectSlug: string;
1456
+ discussionId: string;
1457
+ }[];
1458
+ listeners: {
1459
+ status: "active" | "removed";
1460
+ projectId: string;
1461
+ source: "operator" | "seed" | "mention";
1462
+ agentSlug: string;
1463
+ projectSlug: string;
1464
+ updatedAt: string;
1465
+ agentHandle: string;
1466
+ subscribedAt: string;
1467
+ }[];
1468
+ }, {
1469
+ teamId: string;
1470
+ status: "active" | "archived";
1471
+ createdAt: string;
1472
+ id: string;
1473
+ updatedAt: string;
1474
+ slug: string;
1475
+ streams: {
1476
+ id: string;
1477
+ projectId: string;
1478
+ projectSlug: string;
1479
+ discussionId: string;
1480
+ }[];
1481
+ listeners: {
1482
+ status: "active" | "removed";
1483
+ projectId: string;
1484
+ source: "operator" | "seed" | "mention";
1485
+ agentSlug: string;
1486
+ projectSlug: string;
1487
+ updatedAt: string;
1488
+ agentHandle: string;
1489
+ subscribedAt: string;
1490
+ }[];
1491
+ }>;
1492
+ events: z.ZodArray<z.ZodObject<{
1493
+ id: z.ZodString;
1494
+ sequence: z.ZodNumber;
1495
+ teamId: z.ZodString;
1496
+ topicId: z.ZodString;
1497
+ channel: z.ZodString;
1498
+ type: z.ZodEnum<["message.posted", "mention.acknowledged", "response_lease.accepted", "agent.progress", "agent.response", "agent.abstained", "agent.failed"]>;
1499
+ occurredAt: z.ZodString;
1500
+ sendId: z.ZodNullable<z.ZodString>;
1501
+ invocationId: z.ZodNullable<z.ZodString>;
1502
+ assignmentId: z.ZodNullable<z.ZodString>;
1503
+ actor: z.ZodObject<{
1504
+ kind: z.ZodEnum<["user", "agent", "provider", "control-plane"]>;
1505
+ id: z.ZodString;
1506
+ handle: z.ZodNullable<z.ZodString>;
1507
+ }, "strict", z.ZodTypeAny, {
1508
+ kind: "control-plane" | "provider" | "agent" | "user";
1509
+ id: string;
1510
+ handle: string | null;
1511
+ }, {
1512
+ kind: "control-plane" | "provider" | "agent" | "user";
1513
+ id: string;
1514
+ handle: string | null;
1515
+ }>;
1516
+ summary: z.ZodString;
1517
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1518
+ }, "strict", z.ZodTypeAny, {
1519
+ teamId: string;
1520
+ topicId: string;
1521
+ sendId: string | null;
1522
+ invocationId: string | null;
1523
+ assignmentId: string | null;
1524
+ sequence: number;
1525
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1526
+ payload: Record<string, unknown>;
1527
+ id: string;
1528
+ actor: {
1529
+ kind: "control-plane" | "provider" | "agent" | "user";
1530
+ id: string;
1531
+ handle: string | null;
1532
+ };
1533
+ summary: string;
1534
+ channel: string;
1535
+ occurredAt: string;
1536
+ }, {
1537
+ teamId: string;
1538
+ topicId: string;
1539
+ sendId: string | null;
1540
+ invocationId: string | null;
1541
+ assignmentId: string | null;
1542
+ sequence: number;
1543
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1544
+ payload: Record<string, unknown>;
1545
+ id: string;
1546
+ actor: {
1547
+ kind: "control-plane" | "provider" | "agent" | "user";
1548
+ id: string;
1549
+ handle: string | null;
1550
+ };
1551
+ summary: string;
1552
+ channel: string;
1553
+ occurredAt: string;
1554
+ }>, "many">;
1555
+ cursor: z.ZodNullable<z.ZodString>;
1556
+ }, "strict", z.ZodTypeAny, {
1557
+ cursor: string | null;
1558
+ topic: {
1559
+ teamId: string;
1560
+ status: "active" | "archived";
1561
+ createdAt: string;
1562
+ id: string;
1563
+ updatedAt: string;
1564
+ slug: string;
1565
+ streams: {
1566
+ id: string;
1567
+ projectId: string;
1568
+ projectSlug: string;
1569
+ discussionId: string;
1570
+ }[];
1571
+ listeners: {
1572
+ status: "active" | "removed";
1573
+ projectId: string;
1574
+ source: "operator" | "seed" | "mention";
1575
+ agentSlug: string;
1576
+ projectSlug: string;
1577
+ updatedAt: string;
1578
+ agentHandle: string;
1579
+ subscribedAt: string;
1580
+ }[];
1581
+ };
1582
+ events: {
1583
+ teamId: string;
1584
+ topicId: string;
1585
+ sendId: string | null;
1586
+ invocationId: string | null;
1587
+ assignmentId: string | null;
1588
+ sequence: number;
1589
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1590
+ payload: Record<string, unknown>;
1591
+ id: string;
1592
+ actor: {
1593
+ kind: "control-plane" | "provider" | "agent" | "user";
1594
+ id: string;
1595
+ handle: string | null;
1596
+ };
1597
+ summary: string;
1598
+ channel: string;
1599
+ occurredAt: string;
1600
+ }[];
1601
+ }, {
1602
+ cursor: string | null;
553
1603
  topic: {
1604
+ teamId: string;
1605
+ status: "active" | "archived";
1606
+ createdAt: string;
554
1607
  id: string;
1608
+ updatedAt: string;
555
1609
  slug: string;
1610
+ streams: {
1611
+ id: string;
1612
+ projectId: string;
1613
+ projectSlug: string;
1614
+ discussionId: string;
1615
+ }[];
1616
+ listeners: {
1617
+ status: "active" | "removed";
1618
+ projectId: string;
1619
+ source: "operator" | "seed" | "mention";
1620
+ agentSlug: string;
1621
+ projectSlug: string;
1622
+ updatedAt: string;
1623
+ agentHandle: string;
1624
+ subscribedAt: string;
1625
+ }[];
556
1626
  };
557
- projectStream: {
1627
+ events: {
1628
+ teamId: string;
1629
+ topicId: string;
1630
+ sendId: string | null;
1631
+ invocationId: string | null;
1632
+ assignmentId: string | null;
1633
+ sequence: number;
1634
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1635
+ payload: Record<string, unknown>;
558
1636
  id: string;
1637
+ actor: {
1638
+ kind: "control-plane" | "provider" | "agent" | "user";
1639
+ id: string;
1640
+ handle: string | null;
1641
+ };
1642
+ summary: string;
1643
+ channel: string;
1644
+ occurredAt: string;
1645
+ }[];
1646
+ }>;
1647
+ export declare const communicationTopicSubscriptionRequestSchema: z.ZodObject<{
1648
+ agent: z.ZodString;
1649
+ }, "strict", z.ZodTypeAny, {
1650
+ agent: string;
1651
+ }, {
1652
+ agent: string;
1653
+ }>;
1654
+ export declare const communicationTopicSubscriptionReceiptSchema: z.ZodObject<{
1655
+ topicId: z.ZodString;
1656
+ listener: z.ZodObject<{
1657
+ projectId: z.ZodString;
1658
+ agentSlug: z.ZodString;
1659
+ } & {
1660
+ projectSlug: z.ZodString;
1661
+ agentHandle: z.ZodString;
1662
+ status: z.ZodEnum<["active", "removed"]>;
1663
+ subscribedAt: z.ZodString;
1664
+ updatedAt: z.ZodString;
1665
+ source: z.ZodEnum<["mention", "operator", "seed"]>;
1666
+ }, "strict", z.ZodTypeAny, {
1667
+ status: "active" | "removed";
1668
+ projectId: string;
1669
+ source: "operator" | "seed" | "mention";
1670
+ agentSlug: string;
1671
+ projectSlug: string;
1672
+ updatedAt: string;
1673
+ agentHandle: string;
1674
+ subscribedAt: string;
1675
+ }, {
1676
+ status: "active" | "removed";
559
1677
  projectId: string;
1678
+ source: "operator" | "seed" | "mention";
1679
+ agentSlug: string;
1680
+ projectSlug: string;
1681
+ updatedAt: string;
1682
+ agentHandle: string;
1683
+ subscribedAt: string;
1684
+ }>;
1685
+ replayed: z.ZodBoolean;
1686
+ }, "strict", z.ZodTypeAny, {
1687
+ topicId: string;
1688
+ replayed: boolean;
1689
+ listener: {
1690
+ status: "active" | "removed";
1691
+ projectId: string;
1692
+ source: "operator" | "seed" | "mention";
1693
+ agentSlug: string;
560
1694
  projectSlug: string;
1695
+ updatedAt: string;
1696
+ agentHandle: string;
1697
+ subscribedAt: string;
561
1698
  };
562
- discussionId: string;
563
- sourceMessage: string;
1699
+ }, {
1700
+ topicId: string;
564
1701
  replayed: boolean;
1702
+ listener: {
1703
+ status: "active" | "removed";
1704
+ projectId: string;
1705
+ source: "operator" | "seed" | "mention";
1706
+ agentSlug: string;
1707
+ projectSlug: string;
1708
+ updatedAt: string;
1709
+ agentHandle: string;
1710
+ subscribedAt: string;
1711
+ };
1712
+ }>;
1713
+ export declare const providerCommunicationNotificationAcknowledgeRequestSchema: z.ZodObject<{
1714
+ providerId: z.ZodString;
1715
+ runnerId: z.ZodString;
1716
+ observedAt: z.ZodString;
1717
+ }, "strict", z.ZodTypeAny, {
1718
+ providerId: string;
1719
+ runnerId: string;
1720
+ observedAt: string;
1721
+ }, {
1722
+ providerId: string;
1723
+ runnerId: string;
1724
+ observedAt: string;
1725
+ }>;
1726
+ export declare const providerCommunicationTraceEventRequestSchema: z.ZodObject<{
1727
+ leaseToken: z.ZodString;
1728
+ runnerId: z.ZodString;
1729
+ sequence: z.ZodNumber;
1730
+ type: z.ZodString;
1731
+ occurredAt: z.ZodString;
1732
+ summary: z.ZodString;
1733
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1734
+ protectedPayload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1735
+ }, "strict", z.ZodTypeAny, {
1736
+ sequence: number;
1737
+ type: string;
1738
+ payload: Record<string, unknown>;
1739
+ summary: string;
1740
+ occurredAt: string;
1741
+ runnerId: string;
1742
+ leaseToken: string;
1743
+ protectedPayload?: Record<string, unknown> | undefined;
1744
+ }, {
1745
+ sequence: number;
1746
+ type: string;
1747
+ payload: Record<string, unknown>;
1748
+ summary: string;
1749
+ occurredAt: string;
1750
+ runnerId: string;
1751
+ leaseToken: string;
1752
+ protectedPayload?: Record<string, unknown> | undefined;
565
1753
  }>;
566
1754
  export declare const providerDiscussionResponseRequestSchema: z.ZodEffects<z.ZodObject<{
567
1755
  leaseToken: z.ZodString;
@@ -571,29 +1759,29 @@ export declare const providerDiscussionResponseRequestSchema: z.ZodEffects<z.Zod
571
1759
  summary: z.ZodOptional<z.ZodString>;
572
1760
  usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
573
1761
  }, "strict", z.ZodTypeAny, {
574
- leaseToken: string;
575
1762
  runnerId: string;
1763
+ leaseToken: string;
576
1764
  outcome: "responded" | "abstained";
577
1765
  summary?: string | undefined;
578
1766
  usage?: Record<string, unknown> | undefined;
579
1767
  markdown?: string | undefined;
580
1768
  }, {
581
- leaseToken: string;
582
1769
  runnerId: string;
1770
+ leaseToken: string;
583
1771
  summary?: string | undefined;
584
1772
  usage?: Record<string, unknown> | undefined;
585
1773
  markdown?: string | undefined;
586
1774
  outcome?: "responded" | "abstained" | undefined;
587
1775
  }>, {
588
- leaseToken: string;
589
1776
  runnerId: string;
1777
+ leaseToken: string;
590
1778
  outcome: "responded" | "abstained";
591
1779
  summary?: string | undefined;
592
1780
  usage?: Record<string, unknown> | undefined;
593
1781
  markdown?: string | undefined;
594
1782
  }, {
595
- leaseToken: string;
596
1783
  runnerId: string;
1784
+ leaseToken: string;
597
1785
  summary?: string | undefined;
598
1786
  usage?: Record<string, unknown> | undefined;
599
1787
  markdown?: string | undefined;
@@ -607,22 +1795,24 @@ export declare const providerDiscussionResponseReceiptSchema: z.ZodObject<{
607
1795
  status: z.ZodEnum<["responded", "abstained"]>;
608
1796
  settledAt: z.ZodString;
609
1797
  }, "strict", z.ZodTypeAny, {
610
- status: "responded" | "abstained";
611
- schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
612
- assignmentId: string;
613
1798
  invocationId: string;
1799
+ assignmentId: string;
1800
+ schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
1801
+ status: "responded" | "abstained";
614
1802
  messageRef: string;
615
1803
  settledAt: string;
616
1804
  }, {
617
- status: "responded" | "abstained";
618
- schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
619
- assignmentId: string;
620
1805
  invocationId: string;
1806
+ assignmentId: string;
1807
+ schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
1808
+ status: "responded" | "abstained";
621
1809
  messageRef: string;
622
1810
  settledAt: string;
623
1811
  }>;
624
1812
  export type CommunicationSendRequest = z.infer<typeof communicationSendRequestSchema>;
625
1813
  export type CommunicationSendReceipt = z.infer<typeof communicationSendReceiptSchema>;
626
1814
  export type CommunicationResponse = z.infer<typeof communicationResponseSchema>;
1815
+ export type CommunicationTopicEvent = z.infer<typeof communicationTopicEventSchema>;
1816
+ export type CommunicationDiagnostic = z.infer<typeof communicationDiagnosticSchema>;
627
1817
  export type ProviderDiscussionResponseRequest = z.infer<typeof providerDiscussionResponseRequestSchema>;
628
1818
  export type ProviderDiscussionResponseReceipt = z.infer<typeof providerDiscussionResponseReceiptSchema>;