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

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.
@@ -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
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
54
+ id: string;
55
+ actor: {
56
+ kind: "control-plane" | "provider" | "agent" | "user";
57
+ id: string;
58
+ handle: string | null;
59
+ };
60
+ summary: string;
61
+ teamId: string;
62
+ channel: string;
63
+ assignmentId: string | null;
64
+ sequence: number;
65
+ topicId: string;
66
+ occurredAt: string;
67
+ sendId: string | null;
68
+ invocationId: string | null;
69
+ payload: Record<string, unknown>;
70
+ }, {
71
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
72
+ id: string;
73
+ actor: {
74
+ kind: "control-plane" | "provider" | "agent" | "user";
75
+ id: string;
76
+ handle: string | null;
77
+ };
78
+ summary: string;
79
+ teamId: string;
80
+ channel: string;
81
+ assignmentId: string | null;
82
+ sequence: number;
83
+ topicId: string;
84
+ occurredAt: string;
85
+ sendId: string | null;
86
+ invocationId: string | null;
87
+ payload: Record<string, unknown>;
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;
@@ -102,6 +240,85 @@ 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, {
106
323
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
107
324
  projectId: string;
@@ -120,6 +337,28 @@ export declare const communicationTargetSchema: z.ZodObject<{
120
337
  returnedAt: string | null;
121
338
  failedAt: string | null;
122
339
  };
340
+ diagnostics: {
341
+ resources: Record<string, unknown>;
342
+ reason: string | null;
343
+ provider: {
344
+ providerId: string | null;
345
+ executionProviderId: string | null;
346
+ runtimeVersion: string | null;
347
+ };
348
+ selection: {
349
+ parameters: Record<string, unknown>;
350
+ capabilities: string[];
351
+ model: string | null;
352
+ };
353
+ usage: Record<string, unknown>[];
354
+ availability: "available" | "unavailable" | "partial";
355
+ identityManifest: Record<string, unknown>;
356
+ contextManifest: Record<string, unknown>[];
357
+ timing: Record<string, unknown>;
358
+ traceEvents: Record<string, unknown>[];
359
+ fullPayload?: Record<string, unknown> | undefined;
360
+ };
361
+ invocationId: string | null;
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,6 +376,8 @@ 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
  }, {
142
382
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
143
383
  projectId: string;
@@ -156,6 +396,28 @@ export declare const communicationTargetSchema: z.ZodObject<{
156
396
  returnedAt: string | null;
157
397
  failedAt: string | null;
158
398
  };
399
+ diagnostics: {
400
+ resources: Record<string, unknown>;
401
+ reason: string | null;
402
+ provider: {
403
+ providerId: string | null;
404
+ executionProviderId: string | null;
405
+ runtimeVersion: string | null;
406
+ };
407
+ selection: {
408
+ parameters: Record<string, unknown>;
409
+ capabilities: string[];
410
+ model: string | null;
411
+ };
412
+ usage: Record<string, unknown>[];
413
+ availability: "available" | "unavailable" | "partial";
414
+ identityManifest: Record<string, unknown>;
415
+ contextManifest: Record<string, unknown>[];
416
+ timing: Record<string, unknown>;
417
+ traceEvents: Record<string, unknown>[];
418
+ fullPayload?: Record<string, unknown> | undefined;
419
+ };
420
+ invocationId: string | null;
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;
@@ -193,6 +457,7 @@ export declare const communicationResponseSchema: z.ZodObject<{
193
457
  agentSlug: string;
194
458
  assignmentId: string | null;
195
459
  invocationId: string;
460
+ projectSlug: string;
196
461
  requirement: "required" | "optional";
197
462
  messageRef: string;
198
463
  markdown: string;
@@ -203,12 +468,13 @@ export declare const communicationResponseSchema: z.ZodObject<{
203
468
  agentSlug: string;
204
469
  assignmentId: string | null;
205
470
  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;
@@ -316,6 +585,85 @@ 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, {
320
668
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
321
669
  projectId: string;
@@ -334,6 +682,28 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
334
682
  returnedAt: string | null;
335
683
  failedAt: string | null;
336
684
  };
685
+ diagnostics: {
686
+ resources: Record<string, unknown>;
687
+ reason: string | null;
688
+ provider: {
689
+ providerId: string | null;
690
+ executionProviderId: string | null;
691
+ runtimeVersion: string | null;
692
+ };
693
+ selection: {
694
+ parameters: Record<string, unknown>;
695
+ capabilities: string[];
696
+ model: string | null;
697
+ };
698
+ usage: Record<string, unknown>[];
699
+ availability: "available" | "unavailable" | "partial";
700
+ identityManifest: Record<string, unknown>;
701
+ contextManifest: Record<string, unknown>[];
702
+ timing: Record<string, unknown>;
703
+ traceEvents: Record<string, unknown>[];
704
+ fullPayload?: Record<string, unknown> | undefined;
705
+ };
706
+ invocationId: string | null;
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,6 +721,8 @@ 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
  }, {
356
727
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
357
728
  projectId: string;
@@ -370,6 +741,28 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
370
741
  returnedAt: string | null;
371
742
  failedAt: string | null;
372
743
  };
744
+ diagnostics: {
745
+ resources: Record<string, unknown>;
746
+ reason: string | null;
747
+ provider: {
748
+ providerId: string | null;
749
+ executionProviderId: string | null;
750
+ runtimeVersion: string | null;
751
+ };
752
+ selection: {
753
+ parameters: Record<string, unknown>;
754
+ capabilities: string[];
755
+ model: string | null;
756
+ };
757
+ usage: Record<string, unknown>[];
758
+ availability: "available" | "unavailable" | "partial";
759
+ identityManifest: Record<string, unknown>;
760
+ contextManifest: Record<string, unknown>[];
761
+ timing: Record<string, unknown>;
762
+ traceEvents: Record<string, unknown>[];
763
+ fullPayload?: Record<string, unknown> | undefined;
764
+ };
765
+ invocationId: string | null;
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;
@@ -407,6 +802,7 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
407
802
  agentSlug: string;
408
803
  assignmentId: string | null;
409
804
  invocationId: string;
805
+ projectSlug: string;
410
806
  requirement: "required" | "optional";
411
807
  messageRef: string;
412
808
  markdown: string;
@@ -417,16 +813,80 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
417
813
  agentSlug: string;
418
814
  assignmentId: string | null;
419
815
  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
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
849
+ id: string;
850
+ actor: {
851
+ kind: "control-plane" | "provider" | "agent" | "user";
852
+ id: string;
853
+ handle: string | null;
854
+ };
855
+ summary: string;
856
+ teamId: string;
857
+ channel: string;
858
+ assignmentId: string | null;
859
+ sequence: number;
860
+ topicId: string;
861
+ occurredAt: string;
862
+ sendId: string | null;
863
+ invocationId: string | null;
864
+ payload: Record<string, unknown>;
865
+ }, {
866
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
867
+ id: string;
868
+ actor: {
869
+ kind: "control-plane" | "provider" | "agent" | "user";
870
+ id: string;
871
+ handle: string | null;
872
+ };
873
+ summary: string;
874
+ teamId: string;
875
+ channel: string;
876
+ assignmentId: string | null;
877
+ sequence: number;
878
+ topicId: string;
879
+ occurredAt: string;
880
+ sendId: string | null;
881
+ invocationId: string | null;
882
+ payload: Record<string, unknown>;
883
+ }>, "many">;
424
884
  createdAt: z.ZodString;
425
885
  updatedAt: z.ZodString;
426
886
  replayed: z.ZodBoolean;
427
887
  }, "strict", z.ZodTypeAny, {
428
888
  status: "failed" | "running" | "partial" | "complete" | "queued";
429
- schemaVersion: "treeseed.communication-send-receipt/v2";
889
+ schemaVersion: "treeseed.communication-send-receipt/v4";
430
890
  targets: {
431
891
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
432
892
  projectId: string;
@@ -445,6 +905,28 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
445
905
  returnedAt: string | null;
446
906
  failedAt: string | null;
447
907
  };
908
+ diagnostics: {
909
+ resources: Record<string, unknown>;
910
+ reason: string | null;
911
+ provider: {
912
+ providerId: string | null;
913
+ executionProviderId: string | null;
914
+ runtimeVersion: string | null;
915
+ };
916
+ selection: {
917
+ parameters: Record<string, unknown>;
918
+ capabilities: string[];
919
+ model: string | null;
920
+ };
921
+ usage: Record<string, unknown>[];
922
+ availability: "available" | "unavailable" | "partial";
923
+ identityManifest: Record<string, unknown>;
924
+ contextManifest: Record<string, unknown>[];
925
+ timing: Record<string, unknown>;
926
+ traceEvents: Record<string, unknown>[];
927
+ fullPayload?: Record<string, unknown> | undefined;
928
+ };
929
+ invocationId: string | null;
448
930
  projectSlug: string;
449
931
  definitionRevision: string;
450
932
  revisions: {
@@ -453,7 +935,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
453
935
  agentDefinition: string;
454
936
  chatProfile: string;
455
937
  };
456
- invocationId: string | null;
457
938
  requirement: "required" | "optional";
458
939
  parentInvocationId: string | null;
459
940
  depth: number;
@@ -463,6 +944,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
463
944
  code: string;
464
945
  message: string | null;
465
946
  } | null;
947
+ acknowledgedAt: string | null;
948
+ leaseAcceptedAt: string | null;
466
949
  }[];
467
950
  createdAt: string;
468
951
  responses: {
@@ -472,30 +955,49 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
472
955
  agentSlug: string;
473
956
  assignmentId: string | null;
474
957
  invocationId: string;
958
+ projectSlug: string;
475
959
  requirement: "required" | "optional";
476
960
  messageRef: string;
477
961
  markdown: string;
478
962
  }[];
479
963
  teamId: string;
480
964
  channel: string;
481
- updatedAt: string;
482
- messageRef: string;
483
- sendId: string;
484
965
  topic: {
485
966
  id: string;
486
967
  slug: string;
487
968
  };
488
- projectStream: {
969
+ events: {
970
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
971
+ id: string;
972
+ actor: {
973
+ kind: "control-plane" | "provider" | "agent" | "user";
974
+ id: string;
975
+ handle: string | null;
976
+ };
977
+ summary: string;
978
+ teamId: string;
979
+ channel: string;
980
+ assignmentId: string | null;
981
+ sequence: number;
982
+ topicId: string;
983
+ occurredAt: string;
984
+ sendId: string | null;
985
+ invocationId: string | null;
986
+ payload: Record<string, unknown>;
987
+ }[];
988
+ sendId: string;
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
  }, {
497
999
  status: "failed" | "running" | "partial" | "complete" | "queued";
498
- schemaVersion: "treeseed.communication-send-receipt/v2";
1000
+ schemaVersion: "treeseed.communication-send-receipt/v4";
499
1001
  targets: {
500
1002
  status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
501
1003
  projectId: string;
@@ -514,6 +1016,28 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
514
1016
  returnedAt: string | null;
515
1017
  failedAt: string | null;
516
1018
  };
1019
+ diagnostics: {
1020
+ resources: Record<string, unknown>;
1021
+ reason: string | null;
1022
+ provider: {
1023
+ providerId: string | null;
1024
+ executionProviderId: string | null;
1025
+ runtimeVersion: string | null;
1026
+ };
1027
+ selection: {
1028
+ parameters: Record<string, unknown>;
1029
+ capabilities: string[];
1030
+ model: string | null;
1031
+ };
1032
+ usage: Record<string, unknown>[];
1033
+ availability: "available" | "unavailable" | "partial";
1034
+ identityManifest: Record<string, unknown>;
1035
+ contextManifest: Record<string, unknown>[];
1036
+ timing: Record<string, unknown>;
1037
+ traceEvents: Record<string, unknown>[];
1038
+ fullPayload?: Record<string, unknown> | undefined;
1039
+ };
1040
+ invocationId: string | null;
517
1041
  projectSlug: string;
518
1042
  definitionRevision: string;
519
1043
  revisions: {
@@ -522,7 +1046,6 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
522
1046
  agentDefinition: string;
523
1047
  chatProfile: string;
524
1048
  };
525
- invocationId: string | null;
526
1049
  requirement: "required" | "optional";
527
1050
  parentInvocationId: string | null;
528
1051
  depth: number;
@@ -532,6 +1055,8 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
532
1055
  code: string;
533
1056
  message: string | null;
534
1057
  } | null;
1058
+ acknowledgedAt: string | null;
1059
+ leaseAcceptedAt: string | null;
535
1060
  }[];
536
1061
  createdAt: string;
537
1062
  responses: {
@@ -541,27 +1066,690 @@ export declare const communicationSendReceiptSchema: z.ZodObject<{
541
1066
  agentSlug: string;
542
1067
  assignmentId: string | null;
543
1068
  invocationId: string;
1069
+ projectSlug: string;
544
1070
  requirement: "required" | "optional";
545
1071
  messageRef: string;
546
1072
  markdown: string;
547
1073
  }[];
548
1074
  teamId: string;
549
1075
  channel: string;
550
- updatedAt: string;
551
- messageRef: string;
1076
+ topic: {
1077
+ id: string;
1078
+ slug: string;
1079
+ };
1080
+ events: {
1081
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1082
+ id: string;
1083
+ actor: {
1084
+ kind: "control-plane" | "provider" | "agent" | "user";
1085
+ id: string;
1086
+ handle: string | null;
1087
+ };
1088
+ summary: string;
1089
+ teamId: string;
1090
+ channel: string;
1091
+ assignmentId: string | null;
1092
+ sequence: number;
1093
+ topicId: string;
1094
+ occurredAt: string;
1095
+ sendId: string | null;
1096
+ invocationId: string | null;
1097
+ payload: Record<string, unknown>;
1098
+ }[];
552
1099
  sendId: string;
1100
+ updatedAt: 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
+ status: "active" | "archived";
1193
+ id: string;
1194
+ createdAt: string;
1195
+ teamId: 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
+ status: "active" | "archived";
1216
+ id: string;
1217
+ createdAt: string;
1218
+ teamId: 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
+ status: "active" | "archived";
1293
+ id: string;
1294
+ createdAt: string;
1295
+ teamId: 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
+ status: "active" | "archived";
1316
+ id: string;
1317
+ createdAt: string;
1318
+ teamId: 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
+ status: "active" | "archived";
1342
+ id: string;
1343
+ createdAt: string;
1344
+ teamId: 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
+ status: "active" | "archived";
1368
+ id: string;
1369
+ createdAt: string;
1370
+ teamId: 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
+ status: "active" | "archived";
1447
+ id: string;
1448
+ createdAt: string;
1449
+ teamId: 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
+ status: "active" | "archived";
1470
+ id: string;
1471
+ createdAt: string;
1472
+ teamId: 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
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1520
+ id: string;
1521
+ actor: {
1522
+ kind: "control-plane" | "provider" | "agent" | "user";
1523
+ id: string;
1524
+ handle: string | null;
1525
+ };
1526
+ summary: string;
1527
+ teamId: string;
1528
+ channel: string;
1529
+ assignmentId: string | null;
1530
+ sequence: number;
1531
+ topicId: string;
1532
+ occurredAt: string;
1533
+ sendId: string | null;
1534
+ invocationId: string | null;
1535
+ payload: Record<string, unknown>;
1536
+ }, {
1537
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1538
+ id: string;
1539
+ actor: {
1540
+ kind: "control-plane" | "provider" | "agent" | "user";
1541
+ id: string;
1542
+ handle: string | null;
1543
+ };
1544
+ summary: string;
1545
+ teamId: string;
1546
+ channel: string;
1547
+ assignmentId: string | null;
1548
+ sequence: number;
1549
+ topicId: string;
1550
+ occurredAt: string;
1551
+ sendId: string | null;
1552
+ invocationId: string | null;
1553
+ payload: Record<string, unknown>;
1554
+ }>, "many">;
1555
+ cursor: z.ZodNullable<z.ZodString>;
1556
+ }, "strict", z.ZodTypeAny, {
1557
+ cursor: string | null;
1558
+ topic: {
1559
+ status: "active" | "archived";
1560
+ id: string;
1561
+ createdAt: string;
1562
+ teamId: 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
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
1584
+ id: string;
1585
+ actor: {
1586
+ kind: "control-plane" | "provider" | "agent" | "user";
1587
+ id: string;
1588
+ handle: string | null;
1589
+ };
1590
+ summary: string;
1591
+ teamId: string;
1592
+ channel: string;
1593
+ assignmentId: string | null;
1594
+ sequence: number;
1595
+ topicId: string;
1596
+ occurredAt: string;
1597
+ sendId: string | null;
1598
+ invocationId: string | null;
1599
+ payload: Record<string, unknown>;
1600
+ }[];
1601
+ }, {
1602
+ cursor: string | null;
553
1603
  topic: {
1604
+ status: "active" | "archived";
554
1605
  id: string;
1606
+ createdAt: string;
1607
+ teamId: 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
+ type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
558
1629
  id: string;
1630
+ actor: {
1631
+ kind: "control-plane" | "provider" | "agent" | "user";
1632
+ id: string;
1633
+ handle: string | null;
1634
+ };
1635
+ summary: string;
1636
+ teamId: string;
1637
+ channel: string;
1638
+ assignmentId: string | null;
1639
+ sequence: number;
1640
+ topicId: string;
1641
+ occurredAt: string;
1642
+ sendId: string | null;
1643
+ invocationId: string | null;
1644
+ payload: Record<string, unknown>;
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";
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";
559
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
+ type: string;
1737
+ summary: string;
1738
+ sequence: number;
1739
+ occurredAt: string;
1740
+ payload: Record<string, unknown>;
1741
+ runnerId: string;
1742
+ leaseToken: string;
1743
+ protectedPayload?: Record<string, unknown> | undefined;
1744
+ }, {
1745
+ type: string;
1746
+ summary: string;
1747
+ sequence: number;
1748
+ occurredAt: string;
1749
+ payload: Record<string, unknown>;
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;
@@ -624,5 +1812,7 @@ export declare const providerDiscussionResponseReceiptSchema: z.ZodObject<{
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>;