@dual-os/sdk 0.8.0-next.1 → 0.8.0-next.2

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.
@@ -6,73 +6,7 @@ declare namespace AgentChannelConformance_d_exports {
6
6
  export { AgentChannelConformance_d_exports as AgentChannelConformance, ConformanceError, Fixture, run };
7
7
  }
8
8
  export declare const Fixture: Schema.Struct<{
9
- readonly activate: Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
10
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
11
- readonly operationKey: Schema.NonEmptyString;
12
- readonly kind: Schema.Literal<"activate">;
13
- readonly ingressUrl: Schema.String;
14
- readonly state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
15
- }>, Schema.Struct<{
16
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
17
- readonly operationKey: Schema.NonEmptyString;
18
- readonly installationKey: Schema.NonEmptyString;
19
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
20
- readonly kind: Schema.Literal<"deactivate">;
21
- }>, Schema.Struct<{
22
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
23
- readonly operationKey: Schema.NonEmptyString;
24
- readonly installationKey: Schema.NonEmptyString;
25
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
26
- readonly kind: Schema.Literal<"receive">;
27
- readonly request: Schema.Struct<{
28
- readonly body: Schema.String;
29
- readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
30
- readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
31
- readonly url: Schema.String;
32
- }>;
33
- }>, Schema.Struct<{
34
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
35
- readonly operationKey: Schema.NonEmptyString;
36
- readonly installationKey: Schema.NonEmptyString;
37
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
38
- readonly kind: Schema.Literal<"deliver">;
39
- readonly deliveryKey: Schema.NonEmptyString;
40
- readonly destination: Schema.Struct<{
41
- readonly conversationKey: Schema.NonEmptyString;
42
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
43
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
44
- }>;
45
- readonly content: Schema.Struct<{
46
- readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
47
- readonly assetKey: Schema.NonEmptyString;
48
- readonly mediaType: Schema.NonEmptyString;
49
- readonly url: Schema.String;
50
- }>>>;
51
- readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
52
- readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
53
- readonly text: Schema.String;
54
- }>;
55
- readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
56
- }>]>, Schema.Struct<{
57
- readonly asset: Schema.Struct<{
58
- readonly assetKey: Schema.NonEmptyString;
59
- readonly mediaType: Schema.NonEmptyString;
60
- readonly url: Schema.String;
61
- }>;
62
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
63
- readonly identity: Schema.Struct<{
64
- readonly conversation: Schema.Struct<{
65
- readonly conversationKey: Schema.NonEmptyString;
66
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
67
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
68
- }>;
69
- readonly senderKey: Schema.NonEmptyString;
70
- }>;
71
- readonly installationKey: Schema.NonEmptyString;
72
- readonly kind: Schema.Literal<"read_asset">;
73
- readonly operationKey: Schema.NonEmptyString;
74
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
75
- }>]>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
9
+ readonly activate: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
76
10
  readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
77
11
  readonly operationKey: Schema.NonEmptyString;
78
12
  readonly kind: Schema.Literal<"activate">;
@@ -191,76 +125,10 @@ export declare const Fixture: Schema.Struct<{
191
125
  readonly kind: Schema.Literal<"read_asset">;
192
126
  readonly operationKey: Schema.NonEmptyString;
193
127
  readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
194
- }>]>]>;
128
+ }>]>;
195
129
  readonly channelId: Schema.NonEmptyString;
196
130
  readonly connectionId: Schema.optionalKey<Schema.NonEmptyString>;
197
- readonly deactivate: Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
198
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
199
- readonly operationKey: Schema.NonEmptyString;
200
- readonly kind: Schema.Literal<"activate">;
201
- readonly ingressUrl: Schema.String;
202
- readonly state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
203
- }>, Schema.Struct<{
204
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
205
- readonly operationKey: Schema.NonEmptyString;
206
- readonly installationKey: Schema.NonEmptyString;
207
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
208
- readonly kind: Schema.Literal<"deactivate">;
209
- }>, Schema.Struct<{
210
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
211
- readonly operationKey: Schema.NonEmptyString;
212
- readonly installationKey: Schema.NonEmptyString;
213
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
214
- readonly kind: Schema.Literal<"receive">;
215
- readonly request: Schema.Struct<{
216
- readonly body: Schema.String;
217
- readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
218
- readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
219
- readonly url: Schema.String;
220
- }>;
221
- }>, Schema.Struct<{
222
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
223
- readonly operationKey: Schema.NonEmptyString;
224
- readonly installationKey: Schema.NonEmptyString;
225
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
226
- readonly kind: Schema.Literal<"deliver">;
227
- readonly deliveryKey: Schema.NonEmptyString;
228
- readonly destination: Schema.Struct<{
229
- readonly conversationKey: Schema.NonEmptyString;
230
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
231
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
232
- }>;
233
- readonly content: Schema.Struct<{
234
- readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
235
- readonly assetKey: Schema.NonEmptyString;
236
- readonly mediaType: Schema.NonEmptyString;
237
- readonly url: Schema.String;
238
- }>>>;
239
- readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
240
- readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
241
- readonly text: Schema.String;
242
- }>;
243
- readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
244
- }>]>, Schema.Struct<{
245
- readonly asset: Schema.Struct<{
246
- readonly assetKey: Schema.NonEmptyString;
247
- readonly mediaType: Schema.NonEmptyString;
248
- readonly url: Schema.String;
249
- }>;
250
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
251
- readonly identity: Schema.Struct<{
252
- readonly conversation: Schema.Struct<{
253
- readonly conversationKey: Schema.NonEmptyString;
254
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
255
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
256
- }>;
257
- readonly senderKey: Schema.NonEmptyString;
258
- }>;
259
- readonly installationKey: Schema.NonEmptyString;
260
- readonly kind: Schema.Literal<"read_asset">;
261
- readonly operationKey: Schema.NonEmptyString;
262
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
263
- }>]>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
131
+ readonly deactivate: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
264
132
  readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
265
133
  readonly operationKey: Schema.NonEmptyString;
266
134
  readonly kind: Schema.Literal<"activate">;
@@ -379,75 +247,9 @@ export declare const Fixture: Schema.Struct<{
379
247
  readonly kind: Schema.Literal<"read_asset">;
380
248
  readonly operationKey: Schema.NonEmptyString;
381
249
  readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
382
- }>]>]>;
250
+ }>]>;
383
251
  readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
384
- readonly deliver: Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
385
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
386
- readonly operationKey: Schema.NonEmptyString;
387
- readonly kind: Schema.Literal<"activate">;
388
- readonly ingressUrl: Schema.String;
389
- readonly state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
390
- }>, Schema.Struct<{
391
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
392
- readonly operationKey: Schema.NonEmptyString;
393
- readonly installationKey: Schema.NonEmptyString;
394
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
395
- readonly kind: Schema.Literal<"deactivate">;
396
- }>, Schema.Struct<{
397
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
398
- readonly operationKey: Schema.NonEmptyString;
399
- readonly installationKey: Schema.NonEmptyString;
400
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
401
- readonly kind: Schema.Literal<"receive">;
402
- readonly request: Schema.Struct<{
403
- readonly body: Schema.String;
404
- readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
405
- readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
406
- readonly url: Schema.String;
407
- }>;
408
- }>, Schema.Struct<{
409
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
410
- readonly operationKey: Schema.NonEmptyString;
411
- readonly installationKey: Schema.NonEmptyString;
412
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
413
- readonly kind: Schema.Literal<"deliver">;
414
- readonly deliveryKey: Schema.NonEmptyString;
415
- readonly destination: Schema.Struct<{
416
- readonly conversationKey: Schema.NonEmptyString;
417
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
418
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
419
- }>;
420
- readonly content: Schema.Struct<{
421
- readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
422
- readonly assetKey: Schema.NonEmptyString;
423
- readonly mediaType: Schema.NonEmptyString;
424
- readonly url: Schema.String;
425
- }>>>;
426
- readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
427
- readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
428
- readonly text: Schema.String;
429
- }>;
430
- readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
431
- }>]>, Schema.Struct<{
432
- readonly asset: Schema.Struct<{
433
- readonly assetKey: Schema.NonEmptyString;
434
- readonly mediaType: Schema.NonEmptyString;
435
- readonly url: Schema.String;
436
- }>;
437
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
438
- readonly identity: Schema.Struct<{
439
- readonly conversation: Schema.Struct<{
440
- readonly conversationKey: Schema.NonEmptyString;
441
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
442
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
443
- }>;
444
- readonly senderKey: Schema.NonEmptyString;
445
- }>;
446
- readonly installationKey: Schema.NonEmptyString;
447
- readonly kind: Schema.Literal<"read_asset">;
448
- readonly operationKey: Schema.NonEmptyString;
449
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
450
- }>]>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
252
+ readonly deliver: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
451
253
  readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
452
254
  readonly operationKey: Schema.NonEmptyString;
453
255
  readonly kind: Schema.Literal<"activate">;
@@ -566,75 +368,9 @@ export declare const Fixture: Schema.Struct<{
566
368
  readonly kind: Schema.Literal<"read_asset">;
567
369
  readonly operationKey: Schema.NonEmptyString;
568
370
  readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
569
- }>]>]>;
371
+ }>]>;
570
372
  readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
571
- readonly receive: Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
572
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
573
- readonly operationKey: Schema.NonEmptyString;
574
- readonly kind: Schema.Literal<"activate">;
575
- readonly ingressUrl: Schema.String;
576
- readonly state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
577
- }>, Schema.Struct<{
578
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
579
- readonly operationKey: Schema.NonEmptyString;
580
- readonly installationKey: Schema.NonEmptyString;
581
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
582
- readonly kind: Schema.Literal<"deactivate">;
583
- }>, Schema.Struct<{
584
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
585
- readonly operationKey: Schema.NonEmptyString;
586
- readonly installationKey: Schema.NonEmptyString;
587
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
588
- readonly kind: Schema.Literal<"receive">;
589
- readonly request: Schema.Struct<{
590
- readonly body: Schema.String;
591
- readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
592
- readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
593
- readonly url: Schema.String;
594
- }>;
595
- }>, Schema.Struct<{
596
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
597
- readonly operationKey: Schema.NonEmptyString;
598
- readonly installationKey: Schema.NonEmptyString;
599
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
600
- readonly kind: Schema.Literal<"deliver">;
601
- readonly deliveryKey: Schema.NonEmptyString;
602
- readonly destination: Schema.Struct<{
603
- readonly conversationKey: Schema.NonEmptyString;
604
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
605
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
606
- }>;
607
- readonly content: Schema.Struct<{
608
- readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
609
- readonly assetKey: Schema.NonEmptyString;
610
- readonly mediaType: Schema.NonEmptyString;
611
- readonly url: Schema.String;
612
- }>>>;
613
- readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
614
- readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
615
- readonly text: Schema.String;
616
- }>;
617
- readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
618
- }>]>, Schema.Struct<{
619
- readonly asset: Schema.Struct<{
620
- readonly assetKey: Schema.NonEmptyString;
621
- readonly mediaType: Schema.NonEmptyString;
622
- readonly url: Schema.String;
623
- }>;
624
- readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
625
- readonly identity: Schema.Struct<{
626
- readonly conversation: Schema.Struct<{
627
- readonly conversationKey: Schema.NonEmptyString;
628
- readonly kind: Schema.Literals<readonly ["direct", "group"]>;
629
- readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
630
- }>;
631
- readonly senderKey: Schema.NonEmptyString;
632
- }>;
633
- readonly installationKey: Schema.NonEmptyString;
634
- readonly kind: Schema.Literal<"read_asset">;
635
- readonly operationKey: Schema.NonEmptyString;
636
- readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
637
- }>]>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
373
+ readonly receive: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
638
374
  readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
639
375
  readonly operationKey: Schema.NonEmptyString;
640
376
  readonly kind: Schema.Literal<"activate">;
@@ -753,7 +489,7 @@ export declare const Fixture: Schema.Struct<{
753
489
  readonly kind: Schema.Literal<"read_asset">;
754
490
  readonly operationKey: Schema.NonEmptyString;
755
491
  readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
756
- }>]>]>;
492
+ }>]>;
757
493
  }>;
758
494
  export type Fixture = typeof Fixture.Type;
759
495
  declare const ConformanceError_base: Schema.Class<ConformanceError, Schema.TaggedStruct<"AgentChannelConformanceError", {
@@ -801,63 +537,6 @@ export declare const run: (input: {
801
537
  readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
802
538
  readonly url: string;
803
539
  };
804
- } | {
805
- readonly extensions?: {
806
- readonly [x: string]: Schema.Json;
807
- };
808
- readonly operationKey: string;
809
- readonly installationKey: string;
810
- readonly state: Schema.Json;
811
- readonly kind: "deliver";
812
- readonly deliveryKey: string;
813
- readonly destination: {
814
- readonly conversationKey: string;
815
- readonly kind: "direct" | "group";
816
- readonly threadKey?: string;
817
- };
818
- readonly content: {
819
- readonly assets?: readonly {
820
- readonly assetKey: string;
821
- readonly mediaType: string;
822
- readonly url: string;
823
- }[];
824
- readonly mentions?: readonly string[];
825
- readonly replyToMessageKey?: string;
826
- readonly text: string;
827
- };
828
- readonly responseToTimestamp?: string;
829
- } | {
830
- readonly extensions?: {
831
- readonly [x: string]: Schema.Json;
832
- };
833
- readonly operationKey: string;
834
- readonly kind: "activate";
835
- readonly ingressUrl: string;
836
- readonly state?: Schema.Json;
837
- } | {
838
- readonly extensions?: {
839
- readonly [x: string]: Schema.Json;
840
- };
841
- readonly operationKey: string;
842
- readonly installationKey: string;
843
- readonly state: Schema.Json;
844
- readonly kind: "deactivate";
845
- } | {
846
- readonly extensions?: {
847
- readonly [x: string]: Schema.Json;
848
- };
849
- readonly operationKey: string;
850
- readonly installationKey: string;
851
- readonly state: Schema.Json;
852
- readonly kind: "receive";
853
- readonly request: {
854
- readonly body: string;
855
- readonly headers: {
856
- readonly [x: string]: string;
857
- };
858
- readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
859
- readonly url: string;
860
- };
861
540
  } | {
862
541
  readonly extensions?: {
863
542
  readonly [x: string]: Schema.Json;
@@ -994,63 +673,6 @@ export declare const run: (input: {
994
673
  readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
995
674
  readonly url: string;
996
675
  };
997
- } | {
998
- readonly extensions?: {
999
- readonly [x: string]: Schema.Json;
1000
- };
1001
- readonly operationKey: string;
1002
- readonly installationKey: string;
1003
- readonly state: Schema.Json;
1004
- readonly kind: "deliver";
1005
- readonly deliveryKey: string;
1006
- readonly destination: {
1007
- readonly conversationKey: string;
1008
- readonly kind: "direct" | "group";
1009
- readonly threadKey?: string;
1010
- };
1011
- readonly content: {
1012
- readonly assets?: readonly {
1013
- readonly assetKey: string;
1014
- readonly mediaType: string;
1015
- readonly url: string;
1016
- }[];
1017
- readonly mentions?: readonly string[];
1018
- readonly replyToMessageKey?: string;
1019
- readonly text: string;
1020
- };
1021
- readonly responseToTimestamp?: string;
1022
- } | {
1023
- readonly extensions?: {
1024
- readonly [x: string]: Schema.Json;
1025
- };
1026
- readonly operationKey: string;
1027
- readonly kind: "activate";
1028
- readonly ingressUrl: string;
1029
- readonly state?: Schema.Json;
1030
- } | {
1031
- readonly extensions?: {
1032
- readonly [x: string]: Schema.Json;
1033
- };
1034
- readonly operationKey: string;
1035
- readonly installationKey: string;
1036
- readonly state: Schema.Json;
1037
- readonly kind: "deactivate";
1038
- } | {
1039
- readonly extensions?: {
1040
- readonly [x: string]: Schema.Json;
1041
- };
1042
- readonly operationKey: string;
1043
- readonly installationKey: string;
1044
- readonly state: Schema.Json;
1045
- readonly kind: "receive";
1046
- readonly request: {
1047
- readonly body: string;
1048
- readonly headers: {
1049
- readonly [x: string]: string;
1050
- };
1051
- readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1052
- readonly url: string;
1053
- };
1054
676
  } | {
1055
677
  readonly extensions?: {
1056
678
  readonly [x: string]: Schema.Json;
@@ -1186,63 +808,6 @@ export declare const run: (input: {
1186
808
  readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1187
809
  readonly url: string;
1188
810
  };
1189
- } | {
1190
- readonly extensions?: {
1191
- readonly [x: string]: Schema.Json;
1192
- };
1193
- readonly operationKey: string;
1194
- readonly installationKey: string;
1195
- readonly state: Schema.Json;
1196
- readonly kind: "deliver";
1197
- readonly deliveryKey: string;
1198
- readonly destination: {
1199
- readonly conversationKey: string;
1200
- readonly kind: "direct" | "group";
1201
- readonly threadKey?: string;
1202
- };
1203
- readonly content: {
1204
- readonly assets?: readonly {
1205
- readonly assetKey: string;
1206
- readonly mediaType: string;
1207
- readonly url: string;
1208
- }[];
1209
- readonly mentions?: readonly string[];
1210
- readonly replyToMessageKey?: string;
1211
- readonly text: string;
1212
- };
1213
- readonly responseToTimestamp?: string;
1214
- } | {
1215
- readonly extensions?: {
1216
- readonly [x: string]: Schema.Json;
1217
- };
1218
- readonly operationKey: string;
1219
- readonly kind: "activate";
1220
- readonly ingressUrl: string;
1221
- readonly state?: Schema.Json;
1222
- } | {
1223
- readonly extensions?: {
1224
- readonly [x: string]: Schema.Json;
1225
- };
1226
- readonly operationKey: string;
1227
- readonly installationKey: string;
1228
- readonly state: Schema.Json;
1229
- readonly kind: "deactivate";
1230
- } | {
1231
- readonly extensions?: {
1232
- readonly [x: string]: Schema.Json;
1233
- };
1234
- readonly operationKey: string;
1235
- readonly installationKey: string;
1236
- readonly state: Schema.Json;
1237
- readonly kind: "receive";
1238
- readonly request: {
1239
- readonly body: string;
1240
- readonly headers: {
1241
- readonly [x: string]: string;
1242
- };
1243
- readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1244
- readonly url: string;
1245
- };
1246
811
  } | {
1247
812
  readonly extensions?: {
1248
813
  readonly [x: string]: Schema.Json;
@@ -1378,63 +943,6 @@ export declare const run: (input: {
1378
943
  readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1379
944
  readonly url: string;
1380
945
  };
1381
- } | {
1382
- readonly extensions?: {
1383
- readonly [x: string]: Schema.Json;
1384
- };
1385
- readonly operationKey: string;
1386
- readonly installationKey: string;
1387
- readonly state: Schema.Json;
1388
- readonly kind: "deliver";
1389
- readonly deliveryKey: string;
1390
- readonly destination: {
1391
- readonly conversationKey: string;
1392
- readonly kind: "direct" | "group";
1393
- readonly threadKey?: string;
1394
- };
1395
- readonly content: {
1396
- readonly assets?: readonly {
1397
- readonly assetKey: string;
1398
- readonly mediaType: string;
1399
- readonly url: string;
1400
- }[];
1401
- readonly mentions?: readonly string[];
1402
- readonly replyToMessageKey?: string;
1403
- readonly text: string;
1404
- };
1405
- readonly responseToTimestamp?: string;
1406
- } | {
1407
- readonly extensions?: {
1408
- readonly [x: string]: Schema.Json;
1409
- };
1410
- readonly operationKey: string;
1411
- readonly kind: "activate";
1412
- readonly ingressUrl: string;
1413
- readonly state?: Schema.Json;
1414
- } | {
1415
- readonly extensions?: {
1416
- readonly [x: string]: Schema.Json;
1417
- };
1418
- readonly operationKey: string;
1419
- readonly installationKey: string;
1420
- readonly state: Schema.Json;
1421
- readonly kind: "deactivate";
1422
- } | {
1423
- readonly extensions?: {
1424
- readonly [x: string]: Schema.Json;
1425
- };
1426
- readonly operationKey: string;
1427
- readonly installationKey: string;
1428
- readonly state: Schema.Json;
1429
- readonly kind: "receive";
1430
- readonly request: {
1431
- readonly body: string;
1432
- readonly headers: {
1433
- readonly [x: string]: string;
1434
- };
1435
- readonly method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
1436
- readonly url: string;
1437
- };
1438
946
  } | {
1439
947
  readonly extensions?: {
1440
948
  readonly [x: string]: Schema.Json;
@@ -1 +1 @@
1
- {"version":3,"file":"AgentChannelConformance.d.ts","names":["AgentChannel.ChannelError","DualRuntime.Service"],"sources":["../src/AgentChannelConformance.ts"],"mappings":";;;;;;;qBAWa,SAAO,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoFC,OAAA,kBAAAA,eAAA,mBAAA,OAAA,aAAAC"}
@@ -1,5 +1,5 @@
1
1
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
2
- import { EventV2, Key, commandSchema, commandSchemaV2 } from "./AgentChannel.js";
2
+ import { Event, Key, commandSchema } from "./AgentChannel.js";
3
3
  import { Service } from "./DualRuntime.js";
4
4
  import "./AgentChannelConformance.js";
5
5
  import { Effect, Schema } from "effect";
@@ -11,7 +11,7 @@ var AgentChannelConformance_exports = /* @__PURE__ */ __exportAll({
11
11
  Fixture: () => Fixture,
12
12
  run: () => run
13
13
  });
14
- const Command = Schema.Union([commandSchema(Schema.Json), commandSchemaV2(Schema.Json)]);
14
+ const Command = commandSchema(Schema.Json);
15
15
  const Fixture = Schema.Struct({
16
16
  activate: Command,
17
17
  channelId: Key,
@@ -150,7 +150,7 @@ const run = Effect.fn("AgentChannelConformance.run")(function* (input) {
150
150
  operationKey: `${command.operationKey.slice(0, 500)}:replay`
151
151
  }
152
152
  });
153
- if (first.kind !== "receive" || nextReceipt.kind !== "receive" || !Schema.toEquivalence(Schema.Array(EventV2))(first.events, nextReceipt.events)) return yield* new ConformanceError({
153
+ if (first.kind !== "receive" || nextReceipt.kind !== "receive" || !Schema.toEquivalence(Schema.Array(Event))(first.events, nextReceipt.events)) return yield* new ConformanceError({
154
154
  command: kind,
155
155
  rule: "stable_events"
156
156
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AgentChannelConformance.js","names":["AgentChannel.commandSchema","AgentChannel.commandSchemaV2","AgentChannel.Key","DualRuntime.Service","AgentChannel.EventV2"],"sources":["../src/AgentChannelConformance.ts"],"sourcesContent":["/** Public replay conformance suite for channel plugins, runnable with @effect/vitest. */\nimport { Effect, Schema } from \"effect\";\n\nimport * as AgentChannel from \"./AgentChannel.ts\";\nimport * as DualRuntime from \"./DualRuntime.ts\";\n\n// Either protocol: the runtime checks each command against the Channel's own protocol.\nconst Command = Schema.Union([\n AgentChannel.commandSchema(Schema.Json),\n AgentChannel.commandSchemaV2(Schema.Json),\n]);\nexport const Fixture = Schema.Struct({\n activate: Command,\n channelId: AgentChannel.Key,\n connectionId: Schema.optionalKey(AgentChannel.Key),\n deactivate: Command,\n definitionSettings: Schema.Json,\n deliver: Command,\n deploymentSettings: Schema.Json,\n receive: Command,\n});\nexport type Fixture = typeof Fixture.Type;\nexport class ConformanceError extends Schema.TaggedError<ConformanceError>()(\n \"AgentChannelConformanceError\",\n {\n command: Schema.Literals([\"activate\", \"deactivate\", \"receive\", \"deliver\"]),\n rule: Schema.Literals([\"command_kind\", \"stable_result\", \"stable_events\", \"boundary_rejection\"]),\n },\n) {}\n\n/**\n * Replays operations that providers declare safe to replay. At-most-once delivery executes once;\n * the durable host owns its replay prohibition. Use an isolated provider test installation: this\n * suite performs provider effects. The host supplies stable keys; the plugin must recover the same\n * external subscription and emit the same provider event keys, even for a fresh receipt key.\n * Boundary rejection and feature/auth matrices are covered by the SDK's public runtime tests.\n */\nexport const run = Effect.fn(\"AgentChannelConformance.run\")(function* (input: Fixture) {\n const fixture = yield* Schema.decodeUnknownEffect(Fixture)(input, { onExcessProperty: \"error\" });\n const runtime = yield* DualRuntime.Service;\n const definition = yield* runtime.getAgentChannel({ channelId: fixture.channelId });\n const { activate, receive, deliver, deactivate, ...config } = fixture;\n const { connectionId: _connectionId, ...withoutConnection } = config;\n const probes = [\n { code: \"invalid_input\", input: { ...config, channelId: \"\", command: activate } },\n {\n // Invocation keys allow '/', but authored identifiers forbid it, so this cannot activate.\n input: { ...config, channelId: \"conformance/missing/channel\", command: activate },\n code: \"not_found\",\n },\n { code: \"invalid_input\", input: { ...config, command: { ...activate, operationKey: \"\" } } },\n {\n code: \"invalid_input\",\n input: { ...config, agent: { id: \"synthetic-authority\" }, command: activate },\n },\n {\n code: \"invalid_auth\",\n input:\n definition.authMethods.length === 0\n ? { ...config, command: activate, connectionId: \"unexpected\" }\n : { ...withoutConnection, command: activate },\n },\n ];\n for (const probe of probes) {\n const outcome = yield* Effect.suspend(() => runtime.executeAgentChannel(probe.input)).pipe(\n Effect.result,\n );\n if (outcome._tag !== \"Failure\" || outcome.failure.code !== probe.code) {\n return yield* new ConformanceError({ command: \"activate\", rule: \"boundary_rejection\" });\n }\n }\n const commands = [\n [\"activate\", activate],\n [\"receive\", receive],\n [\"deliver\", deliver],\n [\"deactivate\", deactivate],\n ] as const;\n for (const [kind, command] of commands) {\n if (command.kind !== kind) {\n return yield* new ConformanceError({ command: kind, rule: \"command_kind\" });\n }\n }\n const activated = yield* Effect.acquireRelease(\n runtime.executeAgentChannel({ ...config, command: activate }),\n result =>\n runtime\n .executeAgentChannel({\n ...config,\n command: {\n ...deactivate,\n ...(result.kind === \"activate\"\n ? { installationKey: result.installationKey, state: result.state }\n : {}),\n },\n })\n .pipe(Effect.orDie),\n );\n for (const [kind, command] of commands) {\n const first =\n kind === \"activate\" ? activated : yield* runtime.executeAgentChannel({ ...config, command });\n if (kind === \"deliver\" && definition.features.deliveryMode === \"at-most-once\") continue;\n const second = yield* runtime.executeAgentChannel({ ...config, command });\n const firstJson = yield* Schema.decodeUnknownEffect(Schema.Json)(first);\n const secondJson = yield* Schema.decodeUnknownEffect(Schema.Json)(second);\n if (!Schema.toEquivalence(Schema.Json)(firstJson, secondJson)) {\n return yield* new ConformanceError({ command: kind, rule: \"stable_result\" });\n }\n if (kind === \"receive\") {\n const nextReceipt = yield* runtime.executeAgentChannel({\n ...config,\n command: { ...command, operationKey: `${command.operationKey.slice(0, 500)}:replay` },\n });\n if (\n first.kind !== \"receive\" ||\n nextReceipt.kind !== \"receive\" ||\n !Schema.toEquivalence(Schema.Array(AgentChannel.EventV2))(first.events, nextReceipt.events)\n ) {\n return yield* new ConformanceError({ command: kind, rule: \"stable_events\" });\n }\n }\n }\n}, Effect.scoped);\n\nexport * as AgentChannelConformance from \"./AgentChannelConformance.ts\";\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,UAAU,OAAO,MAAM,CAC3BA,cAA2B,OAAO,IAAI,GACtCC,gBAA6B,OAAO,IAAI,CAC1C,CAAC;AACD,MAAa,UAAU,OAAO,OAAO;CACnC,UAAU;CACV,WAAWC;CACX,cAAc,OAAO,YAAYA,GAAgB;CACjD,YAAY;CACZ,oBAAoB,OAAO;CAC3B,SAAS;CACT,oBAAoB,OAAO;CAC3B,SAAS;AACX,CAAC;AAED,IAAa,mBAAb,cAAsC,OAAO,YAA8B,CAAC,CAC1E,gCACA;CACE,SAAS,OAAO,SAAS;EAAC;EAAY;EAAc;EAAW;CAAS,CAAC;CACzE,MAAM,OAAO,SAAS;EAAC;EAAgB;EAAiB;EAAiB;CAAoB,CAAC;AAChG,CACF,CAAC,CAAC,CAAC;;;;;;;;AASH,MAAa,MAAM,OAAO,GAAG,6BAA6B,CAAC,CAAC,WAAW,OAAgB;CACrF,MAAM,UAAU,OAAO,OAAO,oBAAoB,OAAO,CAAC,CAAC,OAAO,EAAE,kBAAkB,QAAQ,CAAC;CAC/F,MAAM,UAAU,OAAOC;CACvB,MAAM,aAAa,OAAO,QAAQ,gBAAgB,EAAE,WAAW,QAAQ,UAAU,CAAC;CAClF,MAAM,EAAE,UAAU,SAAS,SAAS,YAAY,GAAG,WAAW;CAC9D,MAAM,EAAE,cAAc,eAAe,GAAG,sBAAsB;CAC9D,MAAM,SAAS;EACb;GAAE,MAAM;GAAiB,OAAO;IAAE,GAAG;IAAQ,WAAW;IAAI,SAAS;GAAS;EAAE;EAChF;GAEE,OAAO;IAA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AAY,UAAU;EACtC,MAAM,QACJ,SAAS,aAAa,YAAY,OAAO,QAAQ,oBAAoB;GAAE,GAAG;GAAQ;EAAQ,CAAC;EAC7F,IAAI,SAAS,aAAa,WAAW,SAAS,iBAAiB,gBAAgB;EAC/E,MAAM,SAAS,OAAO,QAAQ,oBAAoB;GAAE,GAAG;GAAQ;EAAQ,CAAC;EACxE,MAAM,YAAY,OAAO,OAAO,oBAAoB,OAAO,IAAI,CAAC,CAAC,KAAK;EACtE,MAAM,aAAa,OAAO,OAAO,oBAAoB,OAAO,IAAI,CAAC,CAAC,MAAM;EACxE,IAAI,CAAC,OAAO,cAAc,OAAO,IAAI,CAAC,CAAC,WAAW,UAAU,GAC1D,OAAO,OAAO,IAAI,iBAAiB;GAAE,SAAS;GAAM,MAAM;EAAgB,CAAC;EAE7E,IAAI,SAAS,WAAW;GACtB,MAAM,cAAc,OAAO,QAAQ,oBAAoB;IACrD,GAAG;IACH,SAAS;KAAE,GAAG;KAAS,cAAc,GAAG,QAAQ,aAAa,MAAM,GAAG,GAAG,EAAE;IAAS;GACtF,CAAC;GACD,IACE,MAAM,SAAS,aACf,YAAY,SAAS,aACrB,CAAC,OAAO,cAAc,OAAO,MAAMC,OAAoB,CAAC,CAAC,CAAC,MAAM,QAAQ,YAAY,MAAM,GAE1F,OAAO,OAAO,IAAI,iBAAiB;IAAE,SAAS;IAAM,MAAM;GAAgB,CAAC;EAE/E;CACF;AACF,GAAG,OAAO,MAAM"}
1
+ {"version":3,"file":"AgentChannelConformance.js","names":["AgentChannel.commandSchema","AgentChannel.Key","DualRuntime.Service","AgentChannel.Event"],"sources":["../src/AgentChannelConformance.ts"],"sourcesContent":["/** Public replay conformance suite for channel plugins, runnable with @effect/vitest. */\nimport { Effect, Schema } from \"effect\";\n\nimport * as AgentChannel from \"./AgentChannel.ts\";\nimport * as DualRuntime from \"./DualRuntime.ts\";\n\nconst Command = AgentChannel.commandSchema(Schema.Json);\nexport const Fixture = Schema.Struct({\n activate: Command,\n channelId: AgentChannel.Key,\n connectionId: Schema.optionalKey(AgentChannel.Key),\n deactivate: Command,\n definitionSettings: Schema.Json,\n deliver: Command,\n deploymentSettings: Schema.Json,\n receive: Command,\n});\nexport type Fixture = typeof Fixture.Type;\nexport class ConformanceError extends Schema.TaggedError<ConformanceError>()(\n \"AgentChannelConformanceError\",\n {\n command: Schema.Literals([\"activate\", \"deactivate\", \"receive\", \"deliver\"]),\n rule: Schema.Literals([\"command_kind\", \"stable_result\", \"stable_events\", \"boundary_rejection\"]),\n },\n) {}\n\n/**\n * Replays operations that providers declare safe to replay. At-most-once delivery executes once;\n * the durable host owns its replay prohibition. Use an isolated provider test installation: this\n * suite performs provider effects. The host supplies stable keys; the plugin must recover the same\n * external subscription and emit the same provider event keys, even for a fresh receipt key.\n * Boundary rejection and feature/auth matrices are covered by the SDK's public runtime tests.\n */\nexport const run = Effect.fn(\"AgentChannelConformance.run\")(function* (input: Fixture) {\n const fixture = yield* Schema.decodeUnknownEffect(Fixture)(input, { onExcessProperty: \"error\" });\n const runtime = yield* DualRuntime.Service;\n const definition = yield* runtime.getAgentChannel({ channelId: fixture.channelId });\n const { activate, receive, deliver, deactivate, ...config } = fixture;\n const { connectionId: _connectionId, ...withoutConnection } = config;\n const probes = [\n { code: \"invalid_input\", input: { ...config, channelId: \"\", command: activate } },\n {\n // Invocation keys allow '/', but authored identifiers forbid it, so this cannot activate.\n input: { ...config, channelId: \"conformance/missing/channel\", command: activate },\n code: \"not_found\",\n },\n { code: \"invalid_input\", input: { ...config, command: { ...activate, operationKey: \"\" } } },\n {\n code: \"invalid_input\",\n input: { ...config, agent: { id: \"synthetic-authority\" }, command: activate },\n },\n {\n code: \"invalid_auth\",\n input:\n definition.authMethods.length === 0\n ? { ...config, command: activate, connectionId: \"unexpected\" }\n : { ...withoutConnection, command: activate },\n },\n ];\n for (const probe of probes) {\n const outcome = yield* Effect.suspend(() => runtime.executeAgentChannel(probe.input)).pipe(\n Effect.result,\n );\n if (outcome._tag !== \"Failure\" || outcome.failure.code !== probe.code) {\n return yield* new ConformanceError({ command: \"activate\", rule: \"boundary_rejection\" });\n }\n }\n const commands = [\n [\"activate\", activate],\n [\"receive\", receive],\n [\"deliver\", deliver],\n [\"deactivate\", deactivate],\n ] as const;\n for (const [kind, command] of commands) {\n if (command.kind !== kind) {\n return yield* new ConformanceError({ command: kind, rule: \"command_kind\" });\n }\n }\n const activated = yield* Effect.acquireRelease(\n runtime.executeAgentChannel({ ...config, command: activate }),\n result =>\n runtime\n .executeAgentChannel({\n ...config,\n command: {\n ...deactivate,\n ...(result.kind === \"activate\"\n ? { installationKey: result.installationKey, state: result.state }\n : {}),\n },\n })\n .pipe(Effect.orDie),\n );\n for (const [kind, command] of commands) {\n const first =\n kind === \"activate\" ? activated : yield* runtime.executeAgentChannel({ ...config, command });\n if (kind === \"deliver\" && definition.features.deliveryMode === \"at-most-once\") continue;\n const second = yield* runtime.executeAgentChannel({ ...config, command });\n const firstJson = yield* Schema.decodeUnknownEffect(Schema.Json)(first);\n const secondJson = yield* Schema.decodeUnknownEffect(Schema.Json)(second);\n if (!Schema.toEquivalence(Schema.Json)(firstJson, secondJson)) {\n return yield* new ConformanceError({ command: kind, rule: \"stable_result\" });\n }\n if (kind === \"receive\") {\n const nextReceipt = yield* runtime.executeAgentChannel({\n ...config,\n command: { ...command, operationKey: `${command.operationKey.slice(0, 500)}:replay` },\n });\n if (\n first.kind !== \"receive\" ||\n nextReceipt.kind !== \"receive\" ||\n !Schema.toEquivalence(Schema.Array(AgentChannel.Event))(first.events, nextReceipt.events)\n ) {\n return yield* new ConformanceError({ command: kind, rule: \"stable_events\" });\n }\n }\n }\n}, Effect.scoped);\n\nexport * as AgentChannelConformance from \"./AgentChannelConformance.ts\";\n"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,UAAUA,cAA2B,OAAO,IAAI;AACtD,MAAa,UAAU,OAAO,OAAO;CACnC,UAAU;CACV,WAAWC;CACX,cAAc,OAAO,YAAYA,GAAgB;CACjD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BAAiB;GAAE,SAAS;GAAM,MAAM;EAAgB,CAAC;EAE7E,IAAI,SAAS,WAAW;GACtB,MAAM,cAAc,OAAO,QAAQ,oBAAoB;IACrD,GAAG;IACH,SAAS;KAAE,GAAG;KAAS,cAAc,GAAG,QAAQ,aAAa,MAAM,GAAG,GAAG,EAAE;IAAS;GACtF,CAAC;GACD,IACE,MAAM,SAAS,aACf,YAAY,SAAS,aACrB,CAAC,OAAO,cAAc,OAAO,MAAMC,KAAkB,CAAC,CAAC,CAAC,MAAM,QAAQ,YAAY,MAAM,GAExF,OAAO,OAAO,IAAI,iBAAiB;IAAE,SAAS;IAAM,MAAM;GAAgB,CAAC;EAE/E;CACF;AACF,GAAG,OAAO,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"AgentChannelRuntime.d.ts","names":["AgentChannel.AccessOutcome","AgentChannel.ChannelError","AgentChannel.Definition","AgentChannel.CheckedResult","Plugin.Any","AgentChannel.Any","AgentChannel.Handler","ConnectionResolver.Service"],"sources":["../src/AgentChannelRuntime.ts"],"mappings":";;;;;;;;;;qBAUa,mBAAiB,OAAA;;;;;;;;;;;;;;;;;cAiBxB,KAAG,OAAA;;;cACH,OAAK,OAAA;;;;;;;;;;;;;;;;;;;;;;;;KAgBC,aAAa,IAAI;KACjB,eAAe,MAAM;iBAChB;;WAEN,cACP,mBACG,OAAO,OAAOA,eAA4BC;WACtC,MAAM,iBAAiB,OAAO,OAAOC,YAAyBD;WAC9D,2BACP,mBACG,OAAO,OAAO,OAAO,MAAMA;WACvB,2BACP,mBACG,OAAO,OAAO,OAAO,MAAMA;WACvB,UACP,mBACG,OAAO,OAAOE,eAA4BF;;;qBAEpC,gBAAgB;KAIxB,YAAY,UAAUG,SAAc;KACpC,gBAAgB,UAAUA,OAAY,KAAK,UAAUC,MACtDC,WAAwB,mBAAmB;KAE1C,eAAe,KAAK,UAAUF,QAC/B,gBAAgB,GAAG;KAElB,sBAAsB,KAAK;WACrB,kBAAkB,mBAAmB,SAAS,eAAe,OAAO;IAGvE,iBAAiB,kCACjB,iBAAiB;YAEb,aAAa,UAAUA,SAC/B,eAAe,KACf,sBAAsB,YAAY,MAClC,YAAY,+CACZ,YAAY,+CACZ,YAAY,kCACZ,YAAY,kCACZ,2BAA2B,YAAY,sBACtC,YAAY,kDAAkDG;;qBA0MtD,QAAS,UAAUH,OAAU,kBACtB,QACjB,MAAM,MAAM,gBAAgB,aAAa"}
1
+ {"version":3,"file":"AgentChannelRuntime.d.ts","names":["AgentChannel.AccessOutcome","AgentChannel.ChannelError","AgentChannel.Definition","AgentChannel.CheckedResult","Plugin.Any","AgentChannel.Any","AgentChannel.Handler","ConnectionResolver.Service"],"sources":["../src/AgentChannelRuntime.ts"],"mappings":";;;;;;;;;;qBAUa,mBAAiB,OAAA;;;;;;;;;;;;;;;;;cAiBxB,KAAG,OAAA;;;cACH,OAAK,OAAA;;;;;;;;;;;;;;;;;;;;;;;;KAgBC,aAAa,IAAI;KACjB,eAAe,MAAM;iBAChB;;WAEN,cACP,mBACG,OAAO,OAAOA,eAA4BC;WACtC,MAAM,iBAAiB,OAAO,OAAOC,YAAyBD;WAC9D,2BACP,mBACG,OAAO,OAAO,OAAO,MAAMA;WACvB,2BACP,mBACG,OAAO,OAAO,OAAO,MAAMA;WACvB,UACP,mBACG,OAAO,OAAOE,eAA4BF;;;qBAEpC,gBAAgB;KAIxB,YAAY,UAAUG,SAAc;KACpC,gBAAgB,UAAUA,OAAY,KAAK,UAAUC,MACtDC,WAAwB,mBAAmB;KAE1C,eAAe,KAAK,UAAUF,QAC/B,gBAAgB,GAAG;KAElB,sBAAsB,KAAK;WACrB,kBAAkB,mBAAmB,SAAS,eAAe,OAAO;IAGvE,iBAAiB,kCACjB,iBAAiB;YAEb,aAAa,UAAUA,SAC/B,eAAe,KACf,sBAAsB,YAAY,MAClC,YAAY,+CACZ,YAAY,+CACZ,YAAY,kCACZ,YAAY,kCACZ,2BAA2B,YAAY,sBACtC,YAAY,kDAAkDG;;qBAwMtD,QAAS,UAAUH,OAAU,kBACtB,QACjB,MAAM,MAAM,gBAAgB,aAAa"}