@adecore/agent-contracts 0.70.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chat.d.ts CHANGED
@@ -535,8 +535,20 @@ export declare const ChatUiLinkReadingSchema: z.ZodObject<{
535
535
  detail: z.ZodOptional<z.ZodString>;
536
536
  code: z.ZodOptional<z.ZodString>;
537
537
  reason: z.ZodOptional<z.ZodString>;
538
+ status: z.ZodOptional<z.ZodString>;
538
539
  }, z.core.$strip>;
539
540
  export type ChatUiLinkReading = z.infer<typeof ChatUiLinkReadingSchema>;
541
+ export declare const ChatUiDiffReadingSchema: z.ZodObject<{
542
+ state: z.ZodEnum<{
543
+ patch: "patch";
544
+ refused: "refused";
545
+ }>;
546
+ patch: z.ZodOptional<z.ZodString>;
547
+ truncated: z.ZodOptional<z.ZodBoolean>;
548
+ code: z.ZodOptional<z.ZodString>;
549
+ reason: z.ZodOptional<z.ZodString>;
550
+ }, z.core.$strip>;
551
+ export type ChatUiDiffReading = z.infer<typeof ChatUiDiffReadingSchema>;
540
552
  export declare const ChatUiPlaceReadingSchema: z.ZodObject<{
541
553
  state: z.ZodEnum<{
542
554
  found: "found";
@@ -596,6 +608,7 @@ export declare const ChatUiQueryStateSchema: z.ZodObject<{
596
608
  detail: z.ZodOptional<z.ZodString>;
597
609
  code: z.ZodOptional<z.ZodString>;
598
610
  reason: z.ZodOptional<z.ZodString>;
611
+ status: z.ZodOptional<z.ZodString>;
599
612
  }, z.core.$strip>>>;
600
613
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
601
614
  state: z.ZodEnum<{
@@ -649,6 +662,8 @@ export declare const ChatAssistantItemSchema: z.ZodObject<{
649
662
  start: z.ZodNumber;
650
663
  end: z.ZodNumber;
651
664
  nodeId: z.ZodOptional<z.ZodString>;
665
+ component: z.ZodOptional<z.ZodString>;
666
+ prop: z.ZodOptional<z.ZodString>;
652
667
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
653
668
  }, z.core.$strip>>;
654
669
  fallback: z.ZodString;
@@ -712,6 +727,7 @@ export declare const ChatAssistantItemSchema: z.ZodObject<{
712
727
  detail: z.ZodOptional<z.ZodString>;
713
728
  code: z.ZodOptional<z.ZodString>;
714
729
  reason: z.ZodOptional<z.ZodString>;
730
+ status: z.ZodOptional<z.ZodString>;
715
731
  }, z.core.$strip>>>;
716
732
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
717
733
  state: z.ZodEnum<{
@@ -1168,6 +1184,20 @@ export declare const ChatCompactionItemSchema: z.ZodObject<{
1168
1184
  preTokens: z.ZodNullable<z.ZodNumber>;
1169
1185
  postTokens: z.ZodOptional<z.ZodNumber>;
1170
1186
  }, z.core.$strip>;
1187
+ export declare const ChatSecretItemSchema: z.ZodObject<{
1188
+ id: z.ZodString;
1189
+ createdAt: z.ZodNumber;
1190
+ turnId: z.ZodNullable<z.ZodString>;
1191
+ kind: z.ZodLiteral<"secret">;
1192
+ label: z.ZodString;
1193
+ outcome: z.ZodEnum<{
1194
+ cancelled: "cancelled";
1195
+ declined: "declined";
1196
+ saved: "saved";
1197
+ "timed-out": "timed-out";
1198
+ }>;
1199
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1200
+ }, z.core.$strip>;
1171
1201
  export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1172
1202
  id: z.ZodString;
1173
1203
  createdAt: z.ZodNumber;
@@ -1238,6 +1268,8 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1238
1268
  start: z.ZodNumber;
1239
1269
  end: z.ZodNumber;
1240
1270
  nodeId: z.ZodOptional<z.ZodString>;
1271
+ component: z.ZodOptional<z.ZodString>;
1272
+ prop: z.ZodOptional<z.ZodString>;
1241
1273
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
1242
1274
  }, z.core.$strip>>;
1243
1275
  fallback: z.ZodString;
@@ -1301,6 +1333,7 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1301
1333
  detail: z.ZodOptional<z.ZodString>;
1302
1334
  code: z.ZodOptional<z.ZodString>;
1303
1335
  reason: z.ZodOptional<z.ZodString>;
1336
+ status: z.ZodOptional<z.ZodString>;
1304
1337
  }, z.core.$strip>>>;
1305
1338
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1306
1339
  state: z.ZodEnum<{
@@ -1573,6 +1606,19 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1573
1606
  kind: z.ZodLiteral<"compaction">;
1574
1607
  preTokens: z.ZodNullable<z.ZodNumber>;
1575
1608
  postTokens: z.ZodOptional<z.ZodNumber>;
1609
+ }, z.core.$strip>, z.ZodObject<{
1610
+ id: z.ZodString;
1611
+ createdAt: z.ZodNumber;
1612
+ turnId: z.ZodNullable<z.ZodString>;
1613
+ kind: z.ZodLiteral<"secret">;
1614
+ label: z.ZodString;
1615
+ outcome: z.ZodEnum<{
1616
+ cancelled: "cancelled";
1617
+ declined: "declined";
1618
+ saved: "saved";
1619
+ "timed-out": "timed-out";
1620
+ }>;
1621
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1576
1622
  }, z.core.$strip>], "kind">;
1577
1623
  export type ChatItem = z.infer<typeof ChatItemSchema>;
1578
1624
  export interface ChatUnknownItem {
@@ -1593,6 +1639,7 @@ export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
1593
1639
  export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
1594
1640
  export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
1595
1641
  export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
1642
+ export type ChatSecretItem = z.infer<typeof ChatSecretItemSchema>;
1596
1643
  type ThreadItem = {
1597
1644
  readonly kind: string;
1598
1645
  readonly createdAt: number;
@@ -1674,6 +1721,8 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1674
1721
  start: z.ZodNumber;
1675
1722
  end: z.ZodNumber;
1676
1723
  nodeId: z.ZodOptional<z.ZodString>;
1724
+ component: z.ZodOptional<z.ZodString>;
1725
+ prop: z.ZodOptional<z.ZodString>;
1677
1726
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
1678
1727
  }, z.core.$strip>>;
1679
1728
  fallback: z.ZodString;
@@ -1737,6 +1786,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1737
1786
  detail: z.ZodOptional<z.ZodString>;
1738
1787
  code: z.ZodOptional<z.ZodString>;
1739
1788
  reason: z.ZodOptional<z.ZodString>;
1789
+ status: z.ZodOptional<z.ZodString>;
1740
1790
  }, z.core.$strip>>>;
1741
1791
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1742
1792
  state: z.ZodEnum<{
@@ -2009,6 +2059,19 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2009
2059
  kind: z.ZodLiteral<"compaction">;
2010
2060
  preTokens: z.ZodNullable<z.ZodNumber>;
2011
2061
  postTokens: z.ZodOptional<z.ZodNumber>;
2062
+ }, z.core.$strip>, z.ZodObject<{
2063
+ id: z.ZodString;
2064
+ createdAt: z.ZodNumber;
2065
+ turnId: z.ZodNullable<z.ZodString>;
2066
+ kind: z.ZodLiteral<"secret">;
2067
+ label: z.ZodString;
2068
+ outcome: z.ZodEnum<{
2069
+ cancelled: "cancelled";
2070
+ declined: "declined";
2071
+ saved: "saved";
2072
+ "timed-out": "timed-out";
2073
+ }>;
2074
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
2012
2075
  }, z.core.$strip>], "kind">;
2013
2076
  historyIndex: z.ZodOptional<z.ZodNumber>;
2014
2077
  }, z.core.$strip>, z.ZodObject<{
@@ -2047,6 +2110,8 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2047
2110
  start: z.ZodNumber;
2048
2111
  end: z.ZodNumber;
2049
2112
  nodeId: z.ZodOptional<z.ZodString>;
2113
+ component: z.ZodOptional<z.ZodString>;
2114
+ prop: z.ZodOptional<z.ZodString>;
2050
2115
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
2051
2116
  }, z.core.$strip>>;
2052
2117
  fallback: z.ZodString;
@@ -2097,6 +2162,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2097
2162
  detail: z.ZodOptional<z.ZodString>;
2098
2163
  code: z.ZodOptional<z.ZodString>;
2099
2164
  reason: z.ZodOptional<z.ZodString>;
2165
+ status: z.ZodOptional<z.ZodString>;
2100
2166
  }, z.core.$strip>>>;
2101
2167
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2102
2168
  state: z.ZodEnum<{
@@ -2521,6 +2587,8 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2521
2587
  start: z.ZodNumber;
2522
2588
  end: z.ZodNumber;
2523
2589
  nodeId: z.ZodOptional<z.ZodString>;
2590
+ component: z.ZodOptional<z.ZodString>;
2591
+ prop: z.ZodOptional<z.ZodString>;
2524
2592
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
2525
2593
  }, z.core.$strip>>;
2526
2594
  fallback: z.ZodString;
@@ -2584,6 +2652,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2584
2652
  detail: z.ZodOptional<z.ZodString>;
2585
2653
  code: z.ZodOptional<z.ZodString>;
2586
2654
  reason: z.ZodOptional<z.ZodString>;
2655
+ status: z.ZodOptional<z.ZodString>;
2587
2656
  }, z.core.$strip>>>;
2588
2657
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2589
2658
  state: z.ZodEnum<{
@@ -2856,6 +2925,19 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2856
2925
  kind: z.ZodLiteral<"compaction">;
2857
2926
  preTokens: z.ZodNullable<z.ZodNumber>;
2858
2927
  postTokens: z.ZodOptional<z.ZodNumber>;
2928
+ }, z.core.$strip>, z.ZodObject<{
2929
+ id: z.ZodString;
2930
+ createdAt: z.ZodNumber;
2931
+ turnId: z.ZodNullable<z.ZodString>;
2932
+ kind: z.ZodLiteral<"secret">;
2933
+ label: z.ZodString;
2934
+ outcome: z.ZodEnum<{
2935
+ cancelled: "cancelled";
2936
+ declined: "declined";
2937
+ saved: "saved";
2938
+ "timed-out": "timed-out";
2939
+ }>;
2940
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
2859
2941
  }, z.core.$strip>], "kind">>;
2860
2942
  }, z.core.$strip>], "type">;
2861
2943
  export type ChatEvent = z.infer<typeof ChatEventSchema>;
@@ -2937,6 +3019,8 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
2937
3019
  start: z.ZodNumber;
2938
3020
  end: z.ZodNumber;
2939
3021
  nodeId: z.ZodOptional<z.ZodString>;
3022
+ component: z.ZodOptional<z.ZodString>;
3023
+ prop: z.ZodOptional<z.ZodString>;
2940
3024
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
2941
3025
  }, z.core.$strip>>;
2942
3026
  fallback: z.ZodString;
@@ -3000,6 +3084,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3000
3084
  detail: z.ZodOptional<z.ZodString>;
3001
3085
  code: z.ZodOptional<z.ZodString>;
3002
3086
  reason: z.ZodOptional<z.ZodString>;
3087
+ status: z.ZodOptional<z.ZodString>;
3003
3088
  }, z.core.$strip>>>;
3004
3089
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3005
3090
  state: z.ZodEnum<{
@@ -3272,6 +3357,19 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3272
3357
  kind: z.ZodLiteral<"compaction">;
3273
3358
  preTokens: z.ZodNullable<z.ZodNumber>;
3274
3359
  postTokens: z.ZodOptional<z.ZodNumber>;
3360
+ }, z.core.$strip>, z.ZodObject<{
3361
+ id: z.ZodString;
3362
+ createdAt: z.ZodNumber;
3363
+ turnId: z.ZodNullable<z.ZodString>;
3364
+ kind: z.ZodLiteral<"secret">;
3365
+ label: z.ZodString;
3366
+ outcome: z.ZodEnum<{
3367
+ cancelled: "cancelled";
3368
+ declined: "declined";
3369
+ saved: "saved";
3370
+ "timed-out": "timed-out";
3371
+ }>;
3372
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
3275
3373
  }, z.core.$strip>], "kind">;
3276
3374
  historyIndex: z.ZodOptional<z.ZodNumber>;
3277
3375
  }, z.core.$strip>, z.ZodObject<{
@@ -3310,6 +3408,8 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3310
3408
  start: z.ZodNumber;
3311
3409
  end: z.ZodNumber;
3312
3410
  nodeId: z.ZodOptional<z.ZodString>;
3411
+ component: z.ZodOptional<z.ZodString>;
3412
+ prop: z.ZodOptional<z.ZodString>;
3313
3413
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
3314
3414
  }, z.core.$strip>>;
3315
3415
  fallback: z.ZodString;
@@ -3360,6 +3460,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3360
3460
  detail: z.ZodOptional<z.ZodString>;
3361
3461
  code: z.ZodOptional<z.ZodString>;
3362
3462
  reason: z.ZodOptional<z.ZodString>;
3463
+ status: z.ZodOptional<z.ZodString>;
3363
3464
  }, z.core.$strip>>>;
3364
3465
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3365
3466
  state: z.ZodEnum<{
@@ -3784,6 +3885,8 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3784
3885
  start: z.ZodNumber;
3785
3886
  end: z.ZodNumber;
3786
3887
  nodeId: z.ZodOptional<z.ZodString>;
3888
+ component: z.ZodOptional<z.ZodString>;
3889
+ prop: z.ZodOptional<z.ZodString>;
3787
3890
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
3788
3891
  }, z.core.$strip>>;
3789
3892
  fallback: z.ZodString;
@@ -3847,6 +3950,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
3847
3950
  detail: z.ZodOptional<z.ZodString>;
3848
3951
  code: z.ZodOptional<z.ZodString>;
3849
3952
  reason: z.ZodOptional<z.ZodString>;
3953
+ status: z.ZodOptional<z.ZodString>;
3850
3954
  }, z.core.$strip>>>;
3851
3955
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3852
3956
  state: z.ZodEnum<{
@@ -4119,6 +4223,19 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
4119
4223
  kind: z.ZodLiteral<"compaction">;
4120
4224
  preTokens: z.ZodNullable<z.ZodNumber>;
4121
4225
  postTokens: z.ZodOptional<z.ZodNumber>;
4226
+ }, z.core.$strip>, z.ZodObject<{
4227
+ id: z.ZodString;
4228
+ createdAt: z.ZodNumber;
4229
+ turnId: z.ZodNullable<z.ZodString>;
4230
+ kind: z.ZodLiteral<"secret">;
4231
+ label: z.ZodString;
4232
+ outcome: z.ZodEnum<{
4233
+ cancelled: "cancelled";
4234
+ declined: "declined";
4235
+ saved: "saved";
4236
+ "timed-out": "timed-out";
4237
+ }>;
4238
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
4122
4239
  }, z.core.$strip>], "kind">>;
4123
4240
  }, z.core.$strip>], "type">;
4124
4241
  seq: z.ZodOptional<z.ZodNumber>;
@@ -4294,6 +4411,8 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
4294
4411
  start: z.ZodNumber;
4295
4412
  end: z.ZodNumber;
4296
4413
  nodeId: z.ZodOptional<z.ZodString>;
4414
+ component: z.ZodOptional<z.ZodString>;
4415
+ prop: z.ZodOptional<z.ZodString>;
4297
4416
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
4298
4417
  }, z.core.$strip>>;
4299
4418
  fallback: z.ZodString;
@@ -4357,6 +4476,7 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
4357
4476
  detail: z.ZodOptional<z.ZodString>;
4358
4477
  code: z.ZodOptional<z.ZodString>;
4359
4478
  reason: z.ZodOptional<z.ZodString>;
4479
+ status: z.ZodOptional<z.ZodString>;
4360
4480
  }, z.core.$strip>>>;
4361
4481
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4362
4482
  state: z.ZodEnum<{
@@ -4629,6 +4749,19 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
4629
4749
  kind: z.ZodLiteral<"compaction">;
4630
4750
  preTokens: z.ZodNullable<z.ZodNumber>;
4631
4751
  postTokens: z.ZodOptional<z.ZodNumber>;
4752
+ }, z.core.$strip>, z.ZodObject<{
4753
+ id: z.ZodString;
4754
+ createdAt: z.ZodNumber;
4755
+ turnId: z.ZodNullable<z.ZodString>;
4756
+ kind: z.ZodLiteral<"secret">;
4757
+ label: z.ZodString;
4758
+ outcome: z.ZodEnum<{
4759
+ cancelled: "cancelled";
4760
+ declined: "declined";
4761
+ saved: "saved";
4762
+ "timed-out": "timed-out";
4763
+ }>;
4764
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
4632
4765
  }, z.core.$strip>], "kind">>;
4633
4766
  history: z.ZodObject<{
4634
4767
  start: z.ZodNumber;
@@ -4749,6 +4882,8 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
4749
4882
  start: z.ZodNumber;
4750
4883
  end: z.ZodNumber;
4751
4884
  nodeId: z.ZodOptional<z.ZodString>;
4885
+ component: z.ZodOptional<z.ZodString>;
4886
+ prop: z.ZodOptional<z.ZodString>;
4752
4887
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
4753
4888
  }, z.core.$strip>>;
4754
4889
  fallback: z.ZodString;
@@ -4812,6 +4947,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
4812
4947
  detail: z.ZodOptional<z.ZodString>;
4813
4948
  code: z.ZodOptional<z.ZodString>;
4814
4949
  reason: z.ZodOptional<z.ZodString>;
4950
+ status: z.ZodOptional<z.ZodString>;
4815
4951
  }, z.core.$strip>>>;
4816
4952
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4817
4953
  state: z.ZodEnum<{
@@ -5084,6 +5220,19 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
5084
5220
  kind: z.ZodLiteral<"compaction">;
5085
5221
  preTokens: z.ZodNullable<z.ZodNumber>;
5086
5222
  postTokens: z.ZodOptional<z.ZodNumber>;
5223
+ }, z.core.$strip>, z.ZodObject<{
5224
+ id: z.ZodString;
5225
+ createdAt: z.ZodNumber;
5226
+ turnId: z.ZodNullable<z.ZodString>;
5227
+ kind: z.ZodLiteral<"secret">;
5228
+ label: z.ZodString;
5229
+ outcome: z.ZodEnum<{
5230
+ cancelled: "cancelled";
5231
+ declined: "declined";
5232
+ saved: "saved";
5233
+ "timed-out": "timed-out";
5234
+ }>;
5235
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
5087
5236
  }, z.core.$strip>], "kind">>;
5088
5237
  history: z.ZodObject<{
5089
5238
  start: z.ZodOptional<z.ZodNumber>;
@@ -5659,6 +5808,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
5659
5808
  start: z.ZodNumber;
5660
5809
  end: z.ZodNumber;
5661
5810
  nodeId: z.ZodOptional<z.ZodString>;
5811
+ component: z.ZodOptional<z.ZodString>;
5812
+ prop: z.ZodOptional<z.ZodString>;
5662
5813
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
5663
5814
  }, z.core.$strip>>;
5664
5815
  fallback: z.ZodString;
@@ -5722,6 +5873,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
5722
5873
  detail: z.ZodOptional<z.ZodString>;
5723
5874
  code: z.ZodOptional<z.ZodString>;
5724
5875
  reason: z.ZodOptional<z.ZodString>;
5876
+ status: z.ZodOptional<z.ZodString>;
5725
5877
  }, z.core.$strip>>>;
5726
5878
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5727
5879
  state: z.ZodEnum<{
@@ -5994,6 +6146,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
5994
6146
  kind: z.ZodLiteral<"compaction">;
5995
6147
  preTokens: z.ZodNullable<z.ZodNumber>;
5996
6148
  postTokens: z.ZodOptional<z.ZodNumber>;
6149
+ }, z.core.$strip>, z.ZodObject<{
6150
+ id: z.ZodString;
6151
+ createdAt: z.ZodNumber;
6152
+ turnId: z.ZodNullable<z.ZodString>;
6153
+ kind: z.ZodLiteral<"secret">;
6154
+ label: z.ZodString;
6155
+ outcome: z.ZodEnum<{
6156
+ cancelled: "cancelled";
6157
+ declined: "declined";
6158
+ saved: "saved";
6159
+ "timed-out": "timed-out";
6160
+ }>;
6161
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
5997
6162
  }, z.core.$strip>], "kind">>;
5998
6163
  history: z.ZodOptional<z.ZodObject<{
5999
6164
  start: z.ZodNumber;
@@ -6069,6 +6234,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6069
6234
  start: z.ZodNumber;
6070
6235
  end: z.ZodNumber;
6071
6236
  nodeId: z.ZodOptional<z.ZodString>;
6237
+ component: z.ZodOptional<z.ZodString>;
6238
+ prop: z.ZodOptional<z.ZodString>;
6072
6239
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
6073
6240
  }, z.core.$strip>>;
6074
6241
  fallback: z.ZodString;
@@ -6132,6 +6299,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6132
6299
  detail: z.ZodOptional<z.ZodString>;
6133
6300
  code: z.ZodOptional<z.ZodString>;
6134
6301
  reason: z.ZodOptional<z.ZodString>;
6302
+ status: z.ZodOptional<z.ZodString>;
6135
6303
  }, z.core.$strip>>>;
6136
6304
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6137
6305
  state: z.ZodEnum<{
@@ -6404,6 +6572,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6404
6572
  kind: z.ZodLiteral<"compaction">;
6405
6573
  preTokens: z.ZodNullable<z.ZodNumber>;
6406
6574
  postTokens: z.ZodOptional<z.ZodNumber>;
6575
+ }, z.core.$strip>, z.ZodObject<{
6576
+ id: z.ZodString;
6577
+ createdAt: z.ZodNumber;
6578
+ turnId: z.ZodNullable<z.ZodString>;
6579
+ kind: z.ZodLiteral<"secret">;
6580
+ label: z.ZodString;
6581
+ outcome: z.ZodEnum<{
6582
+ cancelled: "cancelled";
6583
+ declined: "declined";
6584
+ saved: "saved";
6585
+ "timed-out": "timed-out";
6586
+ }>;
6587
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
6407
6588
  }, z.core.$strip>], "kind">>>;
6408
6589
  seq: z.ZodOptional<z.ZodNumber>;
6409
6590
  events: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -6478,6 +6659,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6478
6659
  start: z.ZodNumber;
6479
6660
  end: z.ZodNumber;
6480
6661
  nodeId: z.ZodOptional<z.ZodString>;
6662
+ component: z.ZodOptional<z.ZodString>;
6663
+ prop: z.ZodOptional<z.ZodString>;
6481
6664
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
6482
6665
  }, z.core.$strip>>;
6483
6666
  fallback: z.ZodString;
@@ -6541,6 +6724,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6541
6724
  detail: z.ZodOptional<z.ZodString>;
6542
6725
  code: z.ZodOptional<z.ZodString>;
6543
6726
  reason: z.ZodOptional<z.ZodString>;
6727
+ status: z.ZodOptional<z.ZodString>;
6544
6728
  }, z.core.$strip>>>;
6545
6729
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6546
6730
  state: z.ZodEnum<{
@@ -6813,6 +6997,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6813
6997
  kind: z.ZodLiteral<"compaction">;
6814
6998
  preTokens: z.ZodNullable<z.ZodNumber>;
6815
6999
  postTokens: z.ZodOptional<z.ZodNumber>;
7000
+ }, z.core.$strip>, z.ZodObject<{
7001
+ id: z.ZodString;
7002
+ createdAt: z.ZodNumber;
7003
+ turnId: z.ZodNullable<z.ZodString>;
7004
+ kind: z.ZodLiteral<"secret">;
7005
+ label: z.ZodString;
7006
+ outcome: z.ZodEnum<{
7007
+ cancelled: "cancelled";
7008
+ declined: "declined";
7009
+ saved: "saved";
7010
+ "timed-out": "timed-out";
7011
+ }>;
7012
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
6816
7013
  }, z.core.$strip>], "kind">;
6817
7014
  historyIndex: z.ZodOptional<z.ZodNumber>;
6818
7015
  }, z.core.$strip>, z.ZodObject<{
@@ -6851,6 +7048,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6851
7048
  start: z.ZodNumber;
6852
7049
  end: z.ZodNumber;
6853
7050
  nodeId: z.ZodOptional<z.ZodString>;
7051
+ component: z.ZodOptional<z.ZodString>;
7052
+ prop: z.ZodOptional<z.ZodString>;
6854
7053
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
6855
7054
  }, z.core.$strip>>;
6856
7055
  fallback: z.ZodString;
@@ -6901,6 +7100,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
6901
7100
  detail: z.ZodOptional<z.ZodString>;
6902
7101
  code: z.ZodOptional<z.ZodString>;
6903
7102
  reason: z.ZodOptional<z.ZodString>;
7103
+ status: z.ZodOptional<z.ZodString>;
6904
7104
  }, z.core.$strip>>>;
6905
7105
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6906
7106
  state: z.ZodEnum<{
@@ -7325,6 +7525,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7325
7525
  start: z.ZodNumber;
7326
7526
  end: z.ZodNumber;
7327
7527
  nodeId: z.ZodOptional<z.ZodString>;
7528
+ component: z.ZodOptional<z.ZodString>;
7529
+ prop: z.ZodOptional<z.ZodString>;
7328
7530
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
7329
7531
  }, z.core.$strip>>;
7330
7532
  fallback: z.ZodString;
@@ -7388,6 +7590,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7388
7590
  detail: z.ZodOptional<z.ZodString>;
7389
7591
  code: z.ZodOptional<z.ZodString>;
7390
7592
  reason: z.ZodOptional<z.ZodString>;
7593
+ status: z.ZodOptional<z.ZodString>;
7391
7594
  }, z.core.$strip>>>;
7392
7595
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
7393
7596
  state: z.ZodEnum<{
@@ -7660,6 +7863,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7660
7863
  kind: z.ZodLiteral<"compaction">;
7661
7864
  preTokens: z.ZodNullable<z.ZodNumber>;
7662
7865
  postTokens: z.ZodOptional<z.ZodNumber>;
7866
+ }, z.core.$strip>, z.ZodObject<{
7867
+ id: z.ZodString;
7868
+ createdAt: z.ZodNumber;
7869
+ turnId: z.ZodNullable<z.ZodString>;
7870
+ kind: z.ZodLiteral<"secret">;
7871
+ label: z.ZodString;
7872
+ outcome: z.ZodEnum<{
7873
+ cancelled: "cancelled";
7874
+ declined: "declined";
7875
+ saved: "saved";
7876
+ "timed-out": "timed-out";
7877
+ }>;
7878
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
7663
7879
  }, z.core.$strip>], "kind">>;
7664
7880
  }, z.core.$strip>], "type">>>;
7665
7881
  bookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -7854,6 +8070,8 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7854
8070
  start: z.ZodNumber;
7855
8071
  end: z.ZodNumber;
7856
8072
  nodeId: z.ZodOptional<z.ZodString>;
8073
+ component: z.ZodOptional<z.ZodString>;
8074
+ prop: z.ZodOptional<z.ZodString>;
7857
8075
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
7858
8076
  }, z.core.$strip>>;
7859
8077
  fallback: z.ZodString;
@@ -7917,6 +8135,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
7917
8135
  detail: z.ZodOptional<z.ZodString>;
7918
8136
  code: z.ZodOptional<z.ZodString>;
7919
8137
  reason: z.ZodOptional<z.ZodString>;
8138
+ status: z.ZodOptional<z.ZodString>;
7920
8139
  }, z.core.$strip>>>;
7921
8140
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
7922
8141
  state: z.ZodEnum<{
@@ -8189,6 +8408,19 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
8189
8408
  kind: z.ZodLiteral<"compaction">;
8190
8409
  preTokens: z.ZodNullable<z.ZodNumber>;
8191
8410
  postTokens: z.ZodOptional<z.ZodNumber>;
8411
+ }, z.core.$strip>, z.ZodObject<{
8412
+ id: z.ZodString;
8413
+ createdAt: z.ZodNumber;
8414
+ turnId: z.ZodNullable<z.ZodString>;
8415
+ kind: z.ZodLiteral<"secret">;
8416
+ label: z.ZodString;
8417
+ outcome: z.ZodEnum<{
8418
+ cancelled: "cancelled";
8419
+ declined: "declined";
8420
+ saved: "saved";
8421
+ "timed-out": "timed-out";
8422
+ }>;
8423
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
8192
8424
  }, z.core.$strip>], "kind">>>;
8193
8425
  suggestion: z.ZodOptional<z.ZodString>;
8194
8426
  }, z.core.$strip>;
@@ -8253,6 +8485,16 @@ export declare const ChatUiLinkPayloadSchema: z.ZodObject<{
8253
8485
  nodeId: z.ZodString;
8254
8486
  }, z.core.$strip>;
8255
8487
  export type ChatUiLinkPayload = z.infer<typeof ChatUiLinkPayloadSchema>;
8488
+ export declare const ChatUiDiffPayloadSchema: z.ZodObject<{
8489
+ chatId: z.ZodString;
8490
+ itemId: z.ZodString;
8491
+ blockId: z.ZodString;
8492
+ revision: z.ZodString;
8493
+ reads: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8494
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8495
+ nodeId: z.ZodString;
8496
+ }, z.core.$strip>;
8497
+ export type ChatUiDiffPayload = z.infer<typeof ChatUiDiffPayloadSchema>;
8256
8498
  export declare const ChatQueuePayloadSchema: z.ZodObject<{
8257
8499
  chatId: z.ZodString;
8258
8500
  messageId: z.ZodString;
package/dist/chat.js CHANGED
@@ -348,6 +348,17 @@ export const ChatUiQueryReadingSchema = z.object({
348
348
  });
349
349
  export const ChatUiLinkReadingSchema = UiLinkResolutionSchema;
350
350
  // `state` is a frozen set, like a link's: native clients validate these payloads whole.
351
+ export const ChatUiDiffReadingSchema = z.object({
352
+ state: z.enum(['patch', 'refused']),
353
+ // The change as a unified patch of the one file, read by the host from git.
354
+ patch: z.string().optional(),
355
+ // Set where the host cut the patch short, so a client offers the whole change elsewhere.
356
+ truncated: z.boolean().optional(),
357
+ // A code that names the reason across versions; open, so a new one fails nobody.
358
+ code: z.string().optional(),
359
+ reason: z.string().optional()
360
+ });
361
+ // `state` is a frozen set, like a link's: native clients validate these payloads whole.
351
362
  export const ChatUiPlaceReadingSchema = z.object({
352
363
  state: z.enum(['found', 'missing']),
353
364
  // The address as it was looked up (trimmed), which a reader compares with the address a node has now: a node id alone moves with a reordered Each.
@@ -672,10 +683,19 @@ export const ChatCompactionItemSchema = z.object({
672
683
  // The size the CLI named right after the fold; absent when it named none.
673
684
  postTokens: z.number().int().nonnegative().optional()
674
685
  });
686
+ export const ChatSecretItemSchema = z.object({
687
+ ...base,
688
+ kind: z.literal('secret'),
689
+ // What the person was asked for; the value they gave never appears in the thread.
690
+ label: z.string(),
691
+ outcome: z.enum(['saved', 'declined', 'timed-out', 'cancelled']),
692
+ // The names of the values when one request asked for several.
693
+ fields: z.array(z.string()).optional()
694
+ });
675
695
  /*
676
- * Never a new member here, and never a new value in an enum a chat or a push already carries: the
677
- * native client validates `chat.attach` and `chat.history` whole, so one item it does not know rejects
678
- * the entire conversation. Add optional fields instead.
696
+ * An open union: a client that reads tolerantly keeps a member it does not know as an unknown item in its place, so a
697
+ * new member is fine. A new value in an enum of an existing member that no `openValues` stamps turns that whole item
698
+ * unknown to such a client, so add an optional field instead.
679
699
  */
680
700
  export const ChatItemSchema = openUnion(z.discriminatedUnion('kind', [
681
701
  ChatUserItemSchema,
@@ -687,7 +707,8 @@ export const ChatItemSchema = openUnion(z.discriminatedUnion('kind', [
687
707
  ChatQuestionItemSchema,
688
708
  ChatTurnItemSchema,
689
709
  ChatNoteItemSchema,
690
- ChatCompactionItemSchema
710
+ ChatCompactionItemSchema,
711
+ ChatSecretItemSchema
691
712
  ]), 'ChatItem', { tag: 'kind', base: ['id', 'createdAt', 'turnId'] });
692
713
  function isSubagentItem(item) {
693
714
  return item.kind === 'subagent';
@@ -996,6 +1017,8 @@ export const ChatUiQueryPayloadSchema = z.object({
996
1017
  values: z.record(z.string().max(128), z.unknown()).optional()
997
1018
  });
998
1019
  export const ChatUiLinkPayloadSchema = ChatUiChoicePayloadSchema.omit({ choiceId: true }).extend({ nodeId: z.string().min(1).max(256) });
1020
+ // Names an open Diff of the stored block as a link names its node: the path and the revisions come from that node, never from the client.
1021
+ export const ChatUiDiffPayloadSchema = ChatUiLinkPayloadSchema.extend({});
999
1022
  export const ChatQueuePayloadSchema = z.object({
1000
1023
  chatId: ChatIdSchema,
1001
1024
  messageId: z.string().min(1)
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, AgentStatusSchema, type AgentStatus, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, type AgentRequest, AgentInfoSchema, type AgentInfo, SessionStatusEventSchema, type SessionStatusEvent, AgentResumePayloadSchema, type AgentResumePayload, ApprovalChoiceSchema, type ApprovalChoice, ApprovalRequestSchema, type ApprovalRequest, SessionApprovalsEventSchema, type SessionApprovalsEvent, ApprovalAnswerPayloadSchema, type ApprovalAnswerPayload, ApprovalAnswerResultSchema, type ApprovalAnswerResult, ApprovalPreferencePayloadSchema, type ApprovalPreferencePayload } from './agent.ts';
2
- export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatSuggestionEventSchema, type ChatSuggestionEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, ChatToolOutputPayloadSchema, type ChatToolOutputPayload, ChatToolOutputResultSchema, type ChatToolOutputResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } from './chat.ts';
2
+ export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiDiffReadingSchema, type ChatUiDiffReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, type ChatPayloadRef, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatSecretItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatNoteMessage, type ChatCompactionItem, type ChatSecretItem, type ChatUnknownItem, ChatEventSchema, type ChatEvent, type ChatUnknownEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatSuggestionEventSchema, type ChatSuggestionEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatUiDiffPayloadSchema, type ChatUiDiffPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, ChatToolOutputPayloadSchema, type ChatToolOutputPayload, ChatToolOutputResultSchema, type ChatToolOutputResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListPayloadSchema, type ChatListPayload, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment, holdsConversation, chatActivity, type ChatActivity } from './chat.ts';
3
3
  export { ErrorSchema, type WireError, RequestSchema, type Request, ReplyOkSchema, type ReplyOk, ReplyErrorSchema, type ReplyError, ReplySchema, type Reply, EventSchema, type Event, ServerFrameSchema, type ServerFrame, type ParseResult, parseRequest, parseServerFrame } from './envelope.ts';
4
4
  export { SessionIdSchema, type SessionId } from './ids.ts';
5
5
  export { ModelOptionChoiceSchema, type ModelOptionChoice, ModelOptionDescriptorSchema, type ModelOptionDescriptor, ModelInfoSchema, type ModelInfo, ModelSelectionSchema, type ModelSelection, ModelCatalogProfileSchema, type ModelCatalogProfile, ModelCatalogEntrySchema, type ModelCatalogEntry, ModelCatalogDataSchema, type ModelCatalogData, RuntimeModeSchema, type RuntimeMode, ProviderCapabilitiesSchema, type ProviderCapabilities, ProviderPlatformSchema, type ProviderPlatform, ProviderSignInSchema, type ProviderSignIn, ProviderInstallSchema, type ProviderInstall, ProviderInfoSchema, type ProviderInfo, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, type ProviderPickerGroup, type ProviderPickerGroups, providerGroupOf, pickerGroupsOf, inPickerOrder, separatesGroups, ProviderListResultSchema, type ProviderListResult, resumeCommandFor } from './model.ts';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
2
2
  export { AGENT_KIND_MAX_LENGTH, AgentKindSchema, AgentStatusSchema, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, AgentInfoSchema, SessionStatusEventSchema, AgentResumePayloadSchema, ApprovalChoiceSchema, ApprovalRequestSchema, SessionApprovalsEventSchema, ApprovalAnswerPayloadSchema, ApprovalAnswerResultSchema, ApprovalPreferencePayloadSchema } from './agent.js';
3
- export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatSuggestionEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } from './chat.js';
3
+ export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, scheduledWakeupId, scheduledWakeupAt, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiDiffReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, CHAT_PAYLOAD_INLINE_BYTES, ChatPayloadRefSchema, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, taskRowId, taskIdOfRow, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, activeWorkflows, workflowEndedAt, CHAT_OUTLINE_TEXT_CHARS, outlineItems, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatNoteMessageSchema, ChatCompactionItemSchema, ChatSecretItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatSuggestionEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatUiDiffPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListPayloadSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment, holdsConversation, chatActivity } from './chat.js';
4
4
  export { ErrorSchema, RequestSchema, ReplyOkSchema, ReplyErrorSchema, ReplySchema, EventSchema, ServerFrameSchema, parseRequest, parseServerFrame } from './envelope.js';
5
5
  export { SessionIdSchema } from './ids.js';
6
6
  export { ModelOptionChoiceSchema, ModelOptionDescriptorSchema, ModelInfoSchema, ModelSelectionSchema, ModelCatalogProfileSchema, ModelCatalogEntrySchema, ModelCatalogDataSchema, RuntimeModeSchema, ProviderCapabilitiesSchema, ProviderPlatformSchema, ProviderSignInSchema, ProviderInstallSchema, ProviderInfoSchema, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, providerGroupOf, pickerGroupsOf, inPickerOrder, separatesGroups, ProviderListResultSchema, resumeCommandFor } from './model.js';
@@ -264,6 +264,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
264
264
  start: z.ZodNumber;
265
265
  end: z.ZodNumber;
266
266
  nodeId: z.ZodOptional<z.ZodString>;
267
+ component: z.ZodOptional<z.ZodString>;
268
+ prop: z.ZodOptional<z.ZodString>;
267
269
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
268
270
  }, z.core.$strip>>;
269
271
  fallback: z.ZodString;
@@ -327,6 +329,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
327
329
  detail: z.ZodOptional<z.ZodString>;
328
330
  code: z.ZodOptional<z.ZodString>;
329
331
  reason: z.ZodOptional<z.ZodString>;
332
+ status: z.ZodOptional<z.ZodString>;
330
333
  }, z.core.$strip>>>;
331
334
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
332
335
  state: z.ZodEnum<{
@@ -599,6 +602,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
599
602
  kind: z.ZodLiteral<"compaction">;
600
603
  preTokens: z.ZodNullable<z.ZodNumber>;
601
604
  postTokens: z.ZodOptional<z.ZodNumber>;
605
+ }, z.core.$strip>, z.ZodObject<{
606
+ id: z.ZodString;
607
+ createdAt: z.ZodNumber;
608
+ turnId: z.ZodNullable<z.ZodString>;
609
+ kind: z.ZodLiteral<"secret">;
610
+ label: z.ZodString;
611
+ outcome: z.ZodEnum<{
612
+ cancelled: "cancelled";
613
+ declined: "declined";
614
+ saved: "saved";
615
+ "timed-out": "timed-out";
616
+ }>;
617
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
602
618
  }, z.core.$strip>], "kind">>;
603
619
  history: z.ZodObject<{
604
620
  start: z.ZodNumber;
@@ -866,6 +882,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
866
882
  start: z.ZodNumber;
867
883
  end: z.ZodNumber;
868
884
  nodeId: z.ZodOptional<z.ZodString>;
885
+ component: z.ZodOptional<z.ZodString>;
886
+ prop: z.ZodOptional<z.ZodString>;
869
887
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
870
888
  }, z.core.$strip>>;
871
889
  fallback: z.ZodString;
@@ -929,6 +947,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
929
947
  detail: z.ZodOptional<z.ZodString>;
930
948
  code: z.ZodOptional<z.ZodString>;
931
949
  reason: z.ZodOptional<z.ZodString>;
950
+ status: z.ZodOptional<z.ZodString>;
932
951
  }, z.core.$strip>>>;
933
952
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
934
953
  state: z.ZodEnum<{
@@ -1201,6 +1220,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1201
1220
  kind: z.ZodLiteral<"compaction">;
1202
1221
  preTokens: z.ZodNullable<z.ZodNumber>;
1203
1222
  postTokens: z.ZodOptional<z.ZodNumber>;
1223
+ }, z.core.$strip>, z.ZodObject<{
1224
+ id: z.ZodString;
1225
+ createdAt: z.ZodNumber;
1226
+ turnId: z.ZodNullable<z.ZodString>;
1227
+ kind: z.ZodLiteral<"secret">;
1228
+ label: z.ZodString;
1229
+ outcome: z.ZodEnum<{
1230
+ cancelled: "cancelled";
1231
+ declined: "declined";
1232
+ saved: "saved";
1233
+ "timed-out": "timed-out";
1234
+ }>;
1235
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1204
1236
  }, z.core.$strip>], "kind">>;
1205
1237
  history: z.ZodOptional<z.ZodObject<{
1206
1238
  start: z.ZodNumber;
@@ -1276,6 +1308,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1276
1308
  start: z.ZodNumber;
1277
1309
  end: z.ZodNumber;
1278
1310
  nodeId: z.ZodOptional<z.ZodString>;
1311
+ component: z.ZodOptional<z.ZodString>;
1312
+ prop: z.ZodOptional<z.ZodString>;
1279
1313
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
1280
1314
  }, z.core.$strip>>;
1281
1315
  fallback: z.ZodString;
@@ -1339,6 +1373,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1339
1373
  detail: z.ZodOptional<z.ZodString>;
1340
1374
  code: z.ZodOptional<z.ZodString>;
1341
1375
  reason: z.ZodOptional<z.ZodString>;
1376
+ status: z.ZodOptional<z.ZodString>;
1342
1377
  }, z.core.$strip>>>;
1343
1378
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1344
1379
  state: z.ZodEnum<{
@@ -1611,6 +1646,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1611
1646
  kind: z.ZodLiteral<"compaction">;
1612
1647
  preTokens: z.ZodNullable<z.ZodNumber>;
1613
1648
  postTokens: z.ZodOptional<z.ZodNumber>;
1649
+ }, z.core.$strip>, z.ZodObject<{
1650
+ id: z.ZodString;
1651
+ createdAt: z.ZodNumber;
1652
+ turnId: z.ZodNullable<z.ZodString>;
1653
+ kind: z.ZodLiteral<"secret">;
1654
+ label: z.ZodString;
1655
+ outcome: z.ZodEnum<{
1656
+ cancelled: "cancelled";
1657
+ declined: "declined";
1658
+ saved: "saved";
1659
+ "timed-out": "timed-out";
1660
+ }>;
1661
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1614
1662
  }, z.core.$strip>], "kind">>>;
1615
1663
  seq: z.ZodOptional<z.ZodNumber>;
1616
1664
  events: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1685,6 +1733,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1685
1733
  start: z.ZodNumber;
1686
1734
  end: z.ZodNumber;
1687
1735
  nodeId: z.ZodOptional<z.ZodString>;
1736
+ component: z.ZodOptional<z.ZodString>;
1737
+ prop: z.ZodOptional<z.ZodString>;
1688
1738
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
1689
1739
  }, z.core.$strip>>;
1690
1740
  fallback: z.ZodString;
@@ -1748,6 +1798,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1748
1798
  detail: z.ZodOptional<z.ZodString>;
1749
1799
  code: z.ZodOptional<z.ZodString>;
1750
1800
  reason: z.ZodOptional<z.ZodString>;
1801
+ status: z.ZodOptional<z.ZodString>;
1751
1802
  }, z.core.$strip>>>;
1752
1803
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1753
1804
  state: z.ZodEnum<{
@@ -2020,6 +2071,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2020
2071
  kind: z.ZodLiteral<"compaction">;
2021
2072
  preTokens: z.ZodNullable<z.ZodNumber>;
2022
2073
  postTokens: z.ZodOptional<z.ZodNumber>;
2074
+ }, z.core.$strip>, z.ZodObject<{
2075
+ id: z.ZodString;
2076
+ createdAt: z.ZodNumber;
2077
+ turnId: z.ZodNullable<z.ZodString>;
2078
+ kind: z.ZodLiteral<"secret">;
2079
+ label: z.ZodString;
2080
+ outcome: z.ZodEnum<{
2081
+ cancelled: "cancelled";
2082
+ declined: "declined";
2083
+ saved: "saved";
2084
+ "timed-out": "timed-out";
2085
+ }>;
2086
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
2023
2087
  }, z.core.$strip>], "kind">;
2024
2088
  historyIndex: z.ZodOptional<z.ZodNumber>;
2025
2089
  }, z.core.$strip>, z.ZodObject<{
@@ -2058,6 +2122,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2058
2122
  start: z.ZodNumber;
2059
2123
  end: z.ZodNumber;
2060
2124
  nodeId: z.ZodOptional<z.ZodString>;
2125
+ component: z.ZodOptional<z.ZodString>;
2126
+ prop: z.ZodOptional<z.ZodString>;
2061
2127
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
2062
2128
  }, z.core.$strip>>;
2063
2129
  fallback: z.ZodString;
@@ -2108,6 +2174,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2108
2174
  detail: z.ZodOptional<z.ZodString>;
2109
2175
  code: z.ZodOptional<z.ZodString>;
2110
2176
  reason: z.ZodOptional<z.ZodString>;
2177
+ status: z.ZodOptional<z.ZodString>;
2111
2178
  }, z.core.$strip>>>;
2112
2179
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2113
2180
  state: z.ZodEnum<{
@@ -2532,6 +2599,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2532
2599
  start: z.ZodNumber;
2533
2600
  end: z.ZodNumber;
2534
2601
  nodeId: z.ZodOptional<z.ZodString>;
2602
+ component: z.ZodOptional<z.ZodString>;
2603
+ prop: z.ZodOptional<z.ZodString>;
2535
2604
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
2536
2605
  }, z.core.$strip>>;
2537
2606
  fallback: z.ZodString;
@@ -2595,6 +2664,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2595
2664
  detail: z.ZodOptional<z.ZodString>;
2596
2665
  code: z.ZodOptional<z.ZodString>;
2597
2666
  reason: z.ZodOptional<z.ZodString>;
2667
+ status: z.ZodOptional<z.ZodString>;
2598
2668
  }, z.core.$strip>>>;
2599
2669
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2600
2670
  state: z.ZodEnum<{
@@ -2867,6 +2937,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
2867
2937
  kind: z.ZodLiteral<"compaction">;
2868
2938
  preTokens: z.ZodNullable<z.ZodNumber>;
2869
2939
  postTokens: z.ZodOptional<z.ZodNumber>;
2940
+ }, z.core.$strip>, z.ZodObject<{
2941
+ id: z.ZodString;
2942
+ createdAt: z.ZodNumber;
2943
+ turnId: z.ZodNullable<z.ZodString>;
2944
+ kind: z.ZodLiteral<"secret">;
2945
+ label: z.ZodString;
2946
+ outcome: z.ZodEnum<{
2947
+ cancelled: "cancelled";
2948
+ declined: "declined";
2949
+ saved: "saved";
2950
+ "timed-out": "timed-out";
2951
+ }>;
2952
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
2870
2953
  }, z.core.$strip>], "kind">>;
2871
2954
  }, z.core.$strip>], "type">>>;
2872
2955
  bookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3061,6 +3144,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3061
3144
  start: z.ZodNumber;
3062
3145
  end: z.ZodNumber;
3063
3146
  nodeId: z.ZodOptional<z.ZodString>;
3147
+ component: z.ZodOptional<z.ZodString>;
3148
+ prop: z.ZodOptional<z.ZodString>;
3064
3149
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
3065
3150
  }, z.core.$strip>>;
3066
3151
  fallback: z.ZodString;
@@ -3124,6 +3209,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3124
3209
  detail: z.ZodOptional<z.ZodString>;
3125
3210
  code: z.ZodOptional<z.ZodString>;
3126
3211
  reason: z.ZodOptional<z.ZodString>;
3212
+ status: z.ZodOptional<z.ZodString>;
3127
3213
  }, z.core.$strip>>>;
3128
3214
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3129
3215
  state: z.ZodEnum<{
@@ -3396,6 +3482,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3396
3482
  kind: z.ZodLiteral<"compaction">;
3397
3483
  preTokens: z.ZodNullable<z.ZodNumber>;
3398
3484
  postTokens: z.ZodOptional<z.ZodNumber>;
3485
+ }, z.core.$strip>, z.ZodObject<{
3486
+ id: z.ZodString;
3487
+ createdAt: z.ZodNumber;
3488
+ turnId: z.ZodNullable<z.ZodString>;
3489
+ kind: z.ZodLiteral<"secret">;
3490
+ label: z.ZodString;
3491
+ outcome: z.ZodEnum<{
3492
+ cancelled: "cancelled";
3493
+ declined: "declined";
3494
+ saved: "saved";
3495
+ "timed-out": "timed-out";
3496
+ }>;
3497
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
3399
3498
  }, z.core.$strip>], "kind">>>;
3400
3499
  suggestion: z.ZodOptional<z.ZodString>;
3401
3500
  }, z.core.$strip>;
@@ -3486,6 +3585,28 @@ export declare const AGENT_REQUEST_SCHEMAS: {
3486
3585
  detail: z.ZodOptional<z.ZodString>;
3487
3586
  code: z.ZodOptional<z.ZodString>;
3488
3587
  reason: z.ZodOptional<z.ZodString>;
3588
+ status: z.ZodOptional<z.ZodString>;
3589
+ }, z.core.$strip>;
3590
+ };
3591
+ readonly 'ui.diff': {
3592
+ readonly payload: z.ZodObject<{
3593
+ chatId: z.ZodString;
3594
+ itemId: z.ZodString;
3595
+ blockId: z.ZodString;
3596
+ revision: z.ZodString;
3597
+ reads: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3598
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3599
+ nodeId: z.ZodString;
3600
+ }, z.core.$strip>;
3601
+ readonly result: z.ZodObject<{
3602
+ state: z.ZodEnum<{
3603
+ patch: "patch";
3604
+ refused: "refused";
3605
+ }>;
3606
+ patch: z.ZodOptional<z.ZodString>;
3607
+ truncated: z.ZodOptional<z.ZodBoolean>;
3608
+ code: z.ZodOptional<z.ZodString>;
3609
+ reason: z.ZodOptional<z.ZodString>;
3489
3610
  }, z.core.$strip>;
3490
3611
  };
3491
3612
  readonly 'ui.query': {
@@ -4359,6 +4480,8 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4359
4480
  start: z.ZodNumber;
4360
4481
  end: z.ZodNumber;
4361
4482
  nodeId: z.ZodOptional<z.ZodString>;
4483
+ component: z.ZodOptional<z.ZodString>;
4484
+ prop: z.ZodOptional<z.ZodString>;
4362
4485
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
4363
4486
  }, z.core.$strip>>;
4364
4487
  fallback: z.ZodString;
@@ -4422,6 +4545,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4422
4545
  detail: z.ZodOptional<z.ZodString>;
4423
4546
  code: z.ZodOptional<z.ZodString>;
4424
4547
  reason: z.ZodOptional<z.ZodString>;
4548
+ status: z.ZodOptional<z.ZodString>;
4425
4549
  }, z.core.$strip>>>;
4426
4550
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4427
4551
  state: z.ZodEnum<{
@@ -4694,6 +4818,19 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4694
4818
  kind: z.ZodLiteral<"compaction">;
4695
4819
  preTokens: z.ZodNullable<z.ZodNumber>;
4696
4820
  postTokens: z.ZodOptional<z.ZodNumber>;
4821
+ }, z.core.$strip>, z.ZodObject<{
4822
+ id: z.ZodString;
4823
+ createdAt: z.ZodNumber;
4824
+ turnId: z.ZodNullable<z.ZodString>;
4825
+ kind: z.ZodLiteral<"secret">;
4826
+ label: z.ZodString;
4827
+ outcome: z.ZodEnum<{
4828
+ cancelled: "cancelled";
4829
+ declined: "declined";
4830
+ saved: "saved";
4831
+ "timed-out": "timed-out";
4832
+ }>;
4833
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
4697
4834
  }, z.core.$strip>], "kind">>;
4698
4835
  history: z.ZodObject<{
4699
4836
  start: z.ZodOptional<z.ZodNumber>;
@@ -5801,6 +5938,8 @@ export declare const AGENT_EVENT_SCHEMAS: {
5801
5938
  start: z.ZodNumber;
5802
5939
  end: z.ZodNumber;
5803
5940
  nodeId: z.ZodOptional<z.ZodString>;
5941
+ component: z.ZodOptional<z.ZodString>;
5942
+ prop: z.ZodOptional<z.ZodString>;
5804
5943
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
5805
5944
  }, z.core.$strip>>;
5806
5945
  fallback: z.ZodString;
@@ -5864,6 +6003,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
5864
6003
  detail: z.ZodOptional<z.ZodString>;
5865
6004
  code: z.ZodOptional<z.ZodString>;
5866
6005
  reason: z.ZodOptional<z.ZodString>;
6006
+ status: z.ZodOptional<z.ZodString>;
5867
6007
  }, z.core.$strip>>>;
5868
6008
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5869
6009
  state: z.ZodEnum<{
@@ -6136,6 +6276,19 @@ export declare const AGENT_EVENT_SCHEMAS: {
6136
6276
  kind: z.ZodLiteral<"compaction">;
6137
6277
  preTokens: z.ZodNullable<z.ZodNumber>;
6138
6278
  postTokens: z.ZodOptional<z.ZodNumber>;
6279
+ }, z.core.$strip>, z.ZodObject<{
6280
+ id: z.ZodString;
6281
+ createdAt: z.ZodNumber;
6282
+ turnId: z.ZodNullable<z.ZodString>;
6283
+ kind: z.ZodLiteral<"secret">;
6284
+ label: z.ZodString;
6285
+ outcome: z.ZodEnum<{
6286
+ cancelled: "cancelled";
6287
+ declined: "declined";
6288
+ saved: "saved";
6289
+ "timed-out": "timed-out";
6290
+ }>;
6291
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
6139
6292
  }, z.core.$strip>], "kind">;
6140
6293
  historyIndex: z.ZodOptional<z.ZodNumber>;
6141
6294
  }, z.core.$strip>, z.ZodObject<{
@@ -6174,6 +6327,8 @@ export declare const AGENT_EVENT_SCHEMAS: {
6174
6327
  start: z.ZodNumber;
6175
6328
  end: z.ZodNumber;
6176
6329
  nodeId: z.ZodOptional<z.ZodString>;
6330
+ component: z.ZodOptional<z.ZodString>;
6331
+ prop: z.ZodOptional<z.ZodString>;
6177
6332
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
6178
6333
  }, z.core.$strip>>;
6179
6334
  fallback: z.ZodString;
@@ -6224,6 +6379,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6224
6379
  detail: z.ZodOptional<z.ZodString>;
6225
6380
  code: z.ZodOptional<z.ZodString>;
6226
6381
  reason: z.ZodOptional<z.ZodString>;
6382
+ status: z.ZodOptional<z.ZodString>;
6227
6383
  }, z.core.$strip>>>;
6228
6384
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6229
6385
  state: z.ZodEnum<{
@@ -6648,6 +6804,8 @@ export declare const AGENT_EVENT_SCHEMAS: {
6648
6804
  start: z.ZodNumber;
6649
6805
  end: z.ZodNumber;
6650
6806
  nodeId: z.ZodOptional<z.ZodString>;
6807
+ component: z.ZodOptional<z.ZodString>;
6808
+ prop: z.ZodOptional<z.ZodString>;
6651
6809
  severity: z.ZodOptional<z.ZodLiteral<"warning">>;
6652
6810
  }, z.core.$strip>>;
6653
6811
  fallback: z.ZodString;
@@ -6711,6 +6869,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6711
6869
  detail: z.ZodOptional<z.ZodString>;
6712
6870
  code: z.ZodOptional<z.ZodString>;
6713
6871
  reason: z.ZodOptional<z.ZodString>;
6872
+ status: z.ZodOptional<z.ZodString>;
6714
6873
  }, z.core.$strip>>>;
6715
6874
  places: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6716
6875
  state: z.ZodEnum<{
@@ -6983,6 +7142,19 @@ export declare const AGENT_EVENT_SCHEMAS: {
6983
7142
  kind: z.ZodLiteral<"compaction">;
6984
7143
  preTokens: z.ZodNullable<z.ZodNumber>;
6985
7144
  postTokens: z.ZodOptional<z.ZodNumber>;
7145
+ }, z.core.$strip>, z.ZodObject<{
7146
+ id: z.ZodString;
7147
+ createdAt: z.ZodNumber;
7148
+ turnId: z.ZodNullable<z.ZodString>;
7149
+ kind: z.ZodLiteral<"secret">;
7150
+ label: z.ZodString;
7151
+ outcome: z.ZodEnum<{
7152
+ cancelled: "cancelled";
7153
+ declined: "declined";
7154
+ saved: "saved";
7155
+ "timed-out": "timed-out";
7156
+ }>;
7157
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
6986
7158
  }, z.core.$strip>], "kind">>;
6987
7159
  }, z.core.$strip>], "type">;
6988
7160
  seq: z.ZodOptional<z.ZodNumber>;
package/dist/protocol.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ChatAddBookmarkPayloadSchema, ChatAnswerPayloadSchema, ChatApprovePayloadSchema, ChatAttachPayloadSchema, ChatAttachResultSchema, ChatBookmarksEventSchema, ChatBookmarksResultSchema, ChatCancelPayloadSchema, ChatClearPayloadSchema, ChatConfigurePayloadSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatCreatePayloadSchema, ChatDismissPayloadSchema, ChatEventEnvelopeSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatForkPayloadSchema, ChatForkResultSchema, ChatGoalPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryResultSchema, ChatInfoSchema, ChatListPayloadSchema, ChatListResultSchema, ChatPreferencesPayloadSchema, ChatQueuePayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatRemoveVisualPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiLinkPayloadSchema, ChatUiLinkReadingSchema, ChatUiQueryPayloadSchema, ChatUiQueryReadingSchema, ChatStatusEventSchema, ChatStopSubagentPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentChangedEventSchema, ChatSubagentPayloadSchema, ChatSubagentResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatTargetPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, ChatUnqueueResultSchema, ChatSuggestionEventSchema, ChatVisualsEventSchema, ChatVisualsResultSchema, SkillsListPayloadSchema, SkillsListResultSchema } from './chat.js';
2
+ import { ChatAddBookmarkPayloadSchema, ChatAnswerPayloadSchema, ChatApprovePayloadSchema, ChatAttachPayloadSchema, ChatAttachResultSchema, ChatBookmarksEventSchema, ChatBookmarksResultSchema, ChatCancelPayloadSchema, ChatClearPayloadSchema, ChatConfigurePayloadSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatCreatePayloadSchema, ChatDismissPayloadSchema, ChatEventEnvelopeSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatForkPayloadSchema, ChatForkResultSchema, ChatGoalPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryResultSchema, ChatInfoSchema, ChatListPayloadSchema, ChatListResultSchema, ChatPreferencesPayloadSchema, ChatQueuePayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatRemoveVisualPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiDiffPayloadSchema, ChatUiDiffReadingSchema, ChatUiLinkPayloadSchema, ChatUiLinkReadingSchema, ChatUiQueryPayloadSchema, ChatUiQueryReadingSchema, ChatStatusEventSchema, ChatStopSubagentPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentChangedEventSchema, ChatSubagentPayloadSchema, ChatSubagentResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatTargetPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, ChatUnqueueResultSchema, ChatSuggestionEventSchema, ChatVisualsEventSchema, ChatVisualsResultSchema, SkillsListPayloadSchema, SkillsListResultSchema } from './chat.js';
3
3
  import { ProviderListResultSchema } from './model.js';
4
4
  import { ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, ProviderAccountsSavePayloadSchema, ProviderAccountsSchema, ProviderAccountsShareConfigPayloadSchema } from './provider-accounts.js';
5
5
  import { UsageChangedEventSchema, UsageLimitsSnapshotSchema, UsageSummaryPayloadSchema, UsageSummaryResultSchema } from './usage.js';
@@ -17,6 +17,7 @@ export const AGENT_REQUEST_SCHEMAS = {
17
17
  'chat.send': { payload: ChatSendPayloadSchema, result: ChatSendResultSchema },
18
18
  'chat.uiChoice': { payload: ChatUiChoicePayloadSchema, result: ChatSendResultSchema },
19
19
  'ui.link': { payload: ChatUiLinkPayloadSchema, result: ChatUiLinkReadingSchema },
20
+ 'ui.diff': { payload: ChatUiDiffPayloadSchema, result: ChatUiDiffReadingSchema },
20
21
  'ui.query': { payload: ChatUiQueryPayloadSchema, result: ChatUiQueryReadingSchema },
21
22
  'chat.unqueue': { payload: ChatQueuePayloadSchema, result: ChatUnqueueResultSchema },
22
23
  'chat.sendNow': { payload: ChatQueuePayloadSchema, result: EmptySchema },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -86,8 +86,8 @@
86
86
  "test": "bun --conditions=source test"
87
87
  },
88
88
  "dependencies": {
89
- "@adecore/intelligent-ui": "0.70.0",
90
- "@adecore/utils": "0.70.0",
89
+ "@adecore/intelligent-ui": "0.71.0",
90
+ "@adecore/utils": "0.71.0",
91
91
  "zod": "^4.6.7"
92
92
  },
93
93
  "devDependencies": {
package/src/chat.ts CHANGED
@@ -440,6 +440,19 @@ export type ChatUiQueryReading = z.infer<typeof ChatUiQueryReadingSchema>;
440
440
  export const ChatUiLinkReadingSchema = UiLinkResolutionSchema;
441
441
  export type ChatUiLinkReading = z.infer<typeof ChatUiLinkReadingSchema>;
442
442
 
443
+ // `state` is a frozen set, like a link's: native clients validate these payloads whole.
444
+ export const ChatUiDiffReadingSchema = z.object({
445
+ state: z.enum(['patch', 'refused']),
446
+ // The change as a unified patch of the one file, read by the host from git.
447
+ patch: z.string().optional(),
448
+ // Set where the host cut the patch short, so a client offers the whole change elsewhere.
449
+ truncated: z.boolean().optional(),
450
+ // A code that names the reason across versions; open, so a new one fails nobody.
451
+ code: z.string().optional(),
452
+ reason: z.string().optional()
453
+ });
454
+ export type ChatUiDiffReading = z.infer<typeof ChatUiDiffReadingSchema>;
455
+
443
456
  // `state` is a frozen set, like a link's: native clients validate these payloads whole.
444
457
  export const ChatUiPlaceReadingSchema = z.object({
445
458
  state: z.enum(['found', 'missing']),
@@ -825,10 +838,20 @@ export const ChatCompactionItemSchema = z.object({
825
838
  postTokens: z.number().int().nonnegative().optional()
826
839
  });
827
840
 
841
+ export const ChatSecretItemSchema = z.object({
842
+ ...base,
843
+ kind: z.literal('secret'),
844
+ // What the person was asked for; the value they gave never appears in the thread.
845
+ label: z.string(),
846
+ outcome: z.enum(['saved', 'declined', 'timed-out', 'cancelled']),
847
+ // The names of the values when one request asked for several.
848
+ fields: z.array(z.string()).optional()
849
+ });
850
+
828
851
  /*
829
- * Never a new member here, and never a new value in an enum a chat or a push already carries: the
830
- * native client validates `chat.attach` and `chat.history` whole, so one item it does not know rejects
831
- * the entire conversation. Add optional fields instead.
852
+ * An open union: a client that reads tolerantly keeps a member it does not know as an unknown item in its place, so a
853
+ * new member is fine. A new value in an enum of an existing member that no `openValues` stamps turns that whole item
854
+ * unknown to such a client, so add an optional field instead.
832
855
  */
833
856
  export const ChatItemSchema = openUnion(
834
857
  z.discriminatedUnion('kind', [
@@ -841,7 +864,8 @@ export const ChatItemSchema = openUnion(
841
864
  ChatQuestionItemSchema,
842
865
  ChatTurnItemSchema,
843
866
  ChatNoteItemSchema,
844
- ChatCompactionItemSchema
867
+ ChatCompactionItemSchema,
868
+ ChatSecretItemSchema
845
869
  ]),
846
870
  'ChatItem',
847
871
  { tag: 'kind', base: ['id', 'createdAt', 'turnId'] }
@@ -870,6 +894,7 @@ export type ChatTurnItem = z.infer<typeof ChatTurnItemSchema>;
870
894
  export type ChatNoteItem = z.infer<typeof ChatNoteItemSchema>;
871
895
  export type ChatNoteMessage = z.infer<typeof ChatNoteMessageSchema>;
872
896
  export type ChatCompactionItem = z.infer<typeof ChatCompactionItemSchema>;
897
+ export type ChatSecretItem = z.infer<typeof ChatSecretItemSchema>;
873
898
 
874
899
  // An item as a host holds it or as a client reads it, where a newer host's item may be unknown or carry a newer word.
875
900
  type ThreadItem = { readonly kind: string; readonly createdAt: number };
@@ -1296,6 +1321,10 @@ export type ChatUiQueryPayload = z.infer<typeof ChatUiQueryPayloadSchema>;
1296
1321
  export const ChatUiLinkPayloadSchema = ChatUiChoicePayloadSchema.omit({ choiceId: true }).extend({ nodeId: z.string().min(1).max(256) });
1297
1322
  export type ChatUiLinkPayload = z.infer<typeof ChatUiLinkPayloadSchema>;
1298
1323
 
1324
+ // Names an open Diff of the stored block as a link names its node: the path and the revisions come from that node, never from the client.
1325
+ export const ChatUiDiffPayloadSchema = ChatUiLinkPayloadSchema.extend({});
1326
+ export type ChatUiDiffPayload = z.infer<typeof ChatUiDiffPayloadSchema>;
1327
+
1299
1328
  export const ChatQueuePayloadSchema = z.object({
1300
1329
  chatId: ChatIdSchema,
1301
1330
  messageId: z.string().min(1)
package/src/index.ts CHANGED
@@ -87,6 +87,8 @@ export {
87
87
  type ChatUiQueryReading,
88
88
  ChatUiLinkReadingSchema,
89
89
  type ChatUiLinkReading,
90
+ ChatUiDiffReadingSchema,
91
+ type ChatUiDiffReading,
90
92
  ChatUiPlaceReadingSchema,
91
93
  type ChatUiPlaceReading,
92
94
  ChatUiQueryStateSchema,
@@ -141,6 +143,7 @@ export {
141
143
  ChatNoteItemSchema,
142
144
  ChatNoteMessageSchema,
143
145
  ChatCompactionItemSchema,
146
+ ChatSecretItemSchema,
144
147
  ChatItemSchema,
145
148
  type ChatItem,
146
149
  type ChatUserItem,
@@ -154,6 +157,7 @@ export {
154
157
  type ChatNoteItem,
155
158
  type ChatNoteMessage,
156
159
  type ChatCompactionItem,
160
+ type ChatSecretItem,
157
161
  type ChatUnknownItem,
158
162
  ChatEventSchema,
159
163
  type ChatEvent,
@@ -232,6 +236,8 @@ export {
232
236
  type ChatUiQueryPayload,
233
237
  ChatUiLinkPayloadSchema,
234
238
  type ChatUiLinkPayload,
239
+ ChatUiDiffPayloadSchema,
240
+ type ChatUiDiffPayload,
235
241
  ChatQueuePayloadSchema,
236
242
  type ChatQueuePayload,
237
243
  ChatUnqueueResultSchema,
package/src/protocol.ts CHANGED
@@ -33,6 +33,8 @@ import {
33
33
  ChatSendPayloadSchema,
34
34
  ChatSendResultSchema,
35
35
  ChatUiChoicePayloadSchema,
36
+ ChatUiDiffPayloadSchema,
37
+ ChatUiDiffReadingSchema,
36
38
  ChatUiLinkPayloadSchema,
37
39
  ChatUiLinkReadingSchema,
38
40
  ChatUiQueryPayloadSchema,
@@ -84,6 +86,7 @@ export const AGENT_REQUEST_SCHEMAS = {
84
86
  'chat.send': { payload: ChatSendPayloadSchema, result: ChatSendResultSchema },
85
87
  'chat.uiChoice': { payload: ChatUiChoicePayloadSchema, result: ChatSendResultSchema },
86
88
  'ui.link': { payload: ChatUiLinkPayloadSchema, result: ChatUiLinkReadingSchema },
89
+ 'ui.diff': { payload: ChatUiDiffPayloadSchema, result: ChatUiDiffReadingSchema },
87
90
  'ui.query': { payload: ChatUiQueryPayloadSchema, result: ChatUiQueryReadingSchema },
88
91
  'chat.unqueue': { payload: ChatQueuePayloadSchema, result: ChatUnqueueResultSchema },
89
92
  'chat.sendNow': { payload: ChatQueuePayloadSchema, result: EmptySchema },