@harness-gw/sdk 0.4.1 → 0.5.1

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.
@@ -22,9 +22,9 @@ export declare const RuntimeInfoSchema: z.ZodObject<{
22
22
  name: z.ZodString;
23
23
  }, z.core.$strict>;
24
24
  status: z.ZodEnum<{
25
- unavailable: "unavailable";
26
- ready: "ready";
27
25
  degraded: "degraded";
26
+ ready: "ready";
27
+ unavailable: "unavailable";
28
28
  }>;
29
29
  capabilities: z.ZodObject<{
30
30
  agentCatalog: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -150,30 +150,32 @@ export declare const AgentCatalogEntrySchema: z.ZodObject<{
150
150
  description: z.ZodOptional<z.ZodString>;
151
151
  status: z.ZodOptional<z.ZodEnum<{
152
152
  active: "active";
153
- unknown: "unknown";
153
+ attention: "attention";
154
154
  idle: "idle";
155
155
  running: "running";
156
- attention: "attention";
156
+ unknown: "unknown";
157
157
  }>>;
158
158
  activity: z.ZodOptional<z.ZodEnum<{
159
159
  active: "active";
160
- unknown: "unknown";
161
160
  idle: "idle";
161
+ unknown: "unknown";
162
162
  }>>;
163
163
  visibility: z.ZodOptional<z.ZodEnum<{
164
- visible: "visible";
165
164
  hidden: "hidden";
165
+ visible: "visible";
166
166
  }>>;
167
167
  role: z.ZodOptional<z.ZodLiteral<"creator">>;
168
168
  avatar: z.ZodOptional<z.ZodString>;
169
+ muted: z.ZodOptional<z.ZodLiteral<true>>;
169
170
  }, z.core.$strict>;
170
171
  visibility: z.ZodEnum<{
171
- visible: "visible";
172
172
  hidden: "hidden";
173
+ visible: "visible";
173
174
  }>;
174
175
  selectable: z.ZodBoolean;
175
176
  editable: z.ZodBoolean;
176
177
  avatarEditable: z.ZodBoolean;
178
+ muteEditable: z.ZodBoolean;
177
179
  revision: z.ZodString;
178
180
  }, z.core.$strict>;
179
181
  export type AgentCatalogEntry = z.infer<typeof AgentCatalogEntrySchema>;
@@ -187,30 +189,32 @@ export declare const AgentCatalogResponseSchema: z.ZodObject<{
187
189
  description: z.ZodOptional<z.ZodString>;
188
190
  status: z.ZodOptional<z.ZodEnum<{
189
191
  active: "active";
190
- unknown: "unknown";
192
+ attention: "attention";
191
193
  idle: "idle";
192
194
  running: "running";
193
- attention: "attention";
195
+ unknown: "unknown";
194
196
  }>>;
195
197
  activity: z.ZodOptional<z.ZodEnum<{
196
198
  active: "active";
197
- unknown: "unknown";
198
199
  idle: "idle";
200
+ unknown: "unknown";
199
201
  }>>;
200
202
  visibility: z.ZodOptional<z.ZodEnum<{
201
- visible: "visible";
202
203
  hidden: "hidden";
204
+ visible: "visible";
203
205
  }>>;
204
206
  role: z.ZodOptional<z.ZodLiteral<"creator">>;
205
207
  avatar: z.ZodOptional<z.ZodString>;
208
+ muted: z.ZodOptional<z.ZodLiteral<true>>;
206
209
  }, z.core.$strict>;
207
210
  visibility: z.ZodEnum<{
208
- visible: "visible";
209
211
  hidden: "hidden";
212
+ visible: "visible";
210
213
  }>;
211
214
  selectable: z.ZodBoolean;
212
215
  editable: z.ZodBoolean;
213
216
  avatarEditable: z.ZodBoolean;
217
+ muteEditable: z.ZodBoolean;
214
218
  revision: z.ZodString;
215
219
  }, z.core.$strict>>;
216
220
  }, z.core.$strict>;
@@ -218,23 +222,27 @@ export type AgentCatalogResponse = z.infer<typeof AgentCatalogResponseSchema>;
218
222
  /** The fields an Agent update may write, with the revision it observed. */
219
223
  export declare const AgentUpdateFields: {
220
224
  visibility: z.ZodOptional<z.ZodEnum<{
221
- visible: "visible";
222
225
  hidden: "hidden";
226
+ visible: "visible";
223
227
  }>>;
224
228
  avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ /** Mutes the Agent's notifications, or with `false` unmutes them. */
230
+ muted: z.ZodOptional<z.ZodBoolean>;
225
231
  revision: z.ZodString;
226
232
  };
227
233
  /** At least one field besides the revision. */
228
234
  export declare function writesAgentField(value: {
229
235
  visibility?: unknown;
230
236
  avatar?: unknown;
237
+ muted?: unknown;
231
238
  }): boolean;
232
239
  export declare const AgentUpdateRequestSchema: z.ZodObject<{
233
240
  visibility: z.ZodOptional<z.ZodEnum<{
234
- visible: "visible";
235
241
  hidden: "hidden";
242
+ visible: "visible";
236
243
  }>>;
237
244
  avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ muted: z.ZodOptional<z.ZodBoolean>;
238
246
  revision: z.ZodString;
239
247
  }, z.core.$strict>;
240
248
  export type AgentUpdateRequest = z.infer<typeof AgentUpdateRequestSchema>;
@@ -250,49 +258,51 @@ export declare const AgentUpdateResponseSchema: z.ZodObject<{
250
258
  description: z.ZodOptional<z.ZodString>;
251
259
  status: z.ZodOptional<z.ZodEnum<{
252
260
  active: "active";
253
- unknown: "unknown";
261
+ attention: "attention";
254
262
  idle: "idle";
255
263
  running: "running";
256
- attention: "attention";
264
+ unknown: "unknown";
257
265
  }>>;
258
266
  activity: z.ZodOptional<z.ZodEnum<{
259
267
  active: "active";
260
- unknown: "unknown";
261
268
  idle: "idle";
269
+ unknown: "unknown";
262
270
  }>>;
263
271
  visibility: z.ZodOptional<z.ZodEnum<{
264
- visible: "visible";
265
272
  hidden: "hidden";
273
+ visible: "visible";
266
274
  }>>;
267
275
  role: z.ZodOptional<z.ZodLiteral<"creator">>;
268
276
  avatar: z.ZodOptional<z.ZodString>;
277
+ muted: z.ZodOptional<z.ZodLiteral<true>>;
269
278
  }, z.core.$strict>;
270
279
  visibility: z.ZodEnum<{
271
- visible: "visible";
272
280
  hidden: "hidden";
281
+ visible: "visible";
273
282
  }>;
274
283
  selectable: z.ZodBoolean;
275
284
  editable: z.ZodBoolean;
276
285
  avatarEditable: z.ZodBoolean;
286
+ muteEditable: z.ZodBoolean;
277
287
  revision: z.ZodString;
278
288
  }, z.core.$strict>;
279
289
  }, z.core.$strict>;
280
290
  export type AgentUpdateResponse = z.infer<typeof AgentUpdateResponseSchema>;
281
291
  export declare const SessionStatusSchema: z.ZodEnum<{
282
- unknown: "unknown";
292
+ failed: "failed";
283
293
  idle: "idle";
284
294
  running: "running";
295
+ unknown: "unknown";
285
296
  "waiting-for-input": "waiting-for-input";
286
- failed: "failed";
287
297
  }>;
288
298
  /** The external platform a Session originated from, when the provider reports it. */
289
299
  export declare const SessionPlatformSchema: z.ZodEnum<{
290
300
  buzz: "buzz";
291
- whatsapp: "whatsapp";
301
+ discord: "discord";
302
+ email: "email";
292
303
  slack: "slack";
293
304
  telegram: "telegram";
294
- email: "email";
295
- discord: "discord";
305
+ whatsapp: "whatsapp";
296
306
  }>;
297
307
  export type SessionPlatform = z.infer<typeof SessionPlatformSchema>;
298
308
  export declare const SessionSchema: z.ZodObject<{
@@ -303,21 +313,21 @@ export declare const SessionSchema: z.ZodObject<{
303
313
  createdAt: z.ZodOptional<z.ZodISODateTime>;
304
314
  updatedAt: z.ZodOptional<z.ZodISODateTime>;
305
315
  status: z.ZodEnum<{
306
- unknown: "unknown";
316
+ failed: "failed";
307
317
  idle: "idle";
308
318
  running: "running";
319
+ unknown: "unknown";
309
320
  "waiting-for-input": "waiting-for-input";
310
- failed: "failed";
311
321
  }>;
312
322
  unread: z.ZodOptional<z.ZodBoolean>;
313
323
  pinned: z.ZodOptional<z.ZodBoolean>;
314
324
  platform: z.ZodOptional<z.ZodEnum<{
315
325
  buzz: "buzz";
316
- whatsapp: "whatsapp";
326
+ discord: "discord";
327
+ email: "email";
317
328
  slack: "slack";
318
329
  telegram: "telegram";
319
- email: "email";
320
- discord: "discord";
330
+ whatsapp: "whatsapp";
321
331
  }>>;
322
332
  }, z.core.$strict>;
323
333
  export type Session = z.infer<typeof SessionSchema>;
@@ -332,21 +342,21 @@ export declare const SessionCatalogResponseSchema: z.ZodObject<{
332
342
  createdAt: z.ZodOptional<z.ZodISODateTime>;
333
343
  updatedAt: z.ZodOptional<z.ZodISODateTime>;
334
344
  status: z.ZodEnum<{
335
- unknown: "unknown";
345
+ failed: "failed";
336
346
  idle: "idle";
337
347
  running: "running";
348
+ unknown: "unknown";
338
349
  "waiting-for-input": "waiting-for-input";
339
- failed: "failed";
340
350
  }>;
341
351
  unread: z.ZodOptional<z.ZodBoolean>;
342
352
  pinned: z.ZodOptional<z.ZodBoolean>;
343
353
  platform: z.ZodOptional<z.ZodEnum<{
344
354
  buzz: "buzz";
345
- whatsapp: "whatsapp";
355
+ discord: "discord";
356
+ email: "email";
346
357
  slack: "slack";
347
358
  telegram: "telegram";
348
- email: "email";
349
- discord: "discord";
359
+ whatsapp: "whatsapp";
350
360
  }>>;
351
361
  }, z.core.$strict>>;
352
362
  total: z.ZodNumber;
@@ -396,15 +406,15 @@ export type DiffOperation = (typeof DiffOperation)[keyof typeof DiffOperation];
396
406
  /** One changed file; a move or copy also names where it came from. */
397
407
  export declare const DiffChangeSchema: z.ZodUnion<readonly [z.ZodObject<{
398
408
  operation: z.ZodEnum<{
399
- delete: "delete";
400
409
  add: "add";
410
+ delete: "delete";
401
411
  modify: "modify";
402
412
  }>;
403
413
  path: z.ZodString;
404
414
  }, z.core.$strict>, z.ZodObject<{
405
415
  operation: z.ZodEnum<{
406
- move: "move";
407
416
  copy: "copy";
417
+ move: "move";
408
418
  }>;
409
419
  oldPath: z.ZodString;
410
420
  path: z.ZodString;
@@ -413,15 +423,15 @@ export declare const DiffChangeSchema: z.ZodUnion<readonly [z.ZodObject<{
413
423
  export declare const ToolDiffSchema: z.ZodObject<{
414
424
  changes: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
415
425
  operation: z.ZodEnum<{
416
- delete: "delete";
417
426
  add: "add";
427
+ delete: "delete";
418
428
  modify: "modify";
419
429
  }>;
420
430
  path: z.ZodString;
421
431
  }, z.core.$strict>, z.ZodObject<{
422
432
  operation: z.ZodEnum<{
423
- move: "move";
424
433
  copy: "copy";
434
+ move: "move";
425
435
  }>;
426
436
  oldPath: z.ZodString;
427
437
  path: z.ZodString;
@@ -441,9 +451,9 @@ export declare const SessionMessageErrorStatusSchema: z.ZodObject<{
441
451
  export declare const SessionMessageSchema: z.ZodObject<{
442
452
  id: z.ZodString;
443
453
  role: z.ZodEnum<{
444
- user: "user";
445
454
  assistant: "assistant";
446
455
  system: "system";
456
+ user: "user";
447
457
  }>;
448
458
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
449
459
  type: z.ZodLiteral<"text">;
@@ -464,15 +474,15 @@ export declare const SessionMessageSchema: z.ZodObject<{
464
474
  result: z.ZodOptional<z.ZodJSONSchema>;
465
475
  isError: z.ZodOptional<z.ZodBoolean>;
466
476
  kind: z.ZodOptional<z.ZodEnum<{
467
- search: "search";
468
- read: "read";
469
- edit: "edit";
470
477
  delete: "delete";
471
- move: "move";
478
+ edit: "edit";
472
479
  execute: "execute";
473
- think: "think";
474
480
  fetch: "fetch";
481
+ move: "move";
475
482
  other: "other";
483
+ read: "read";
484
+ search: "search";
485
+ think: "think";
476
486
  }>>;
477
487
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
478
488
  path: z.ZodString;
@@ -481,15 +491,15 @@ export declare const SessionMessageSchema: z.ZodObject<{
481
491
  diffs: z.ZodOptional<z.ZodArray<z.ZodObject<{
482
492
  changes: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
483
493
  operation: z.ZodEnum<{
484
- delete: "delete";
485
494
  add: "add";
495
+ delete: "delete";
486
496
  modify: "modify";
487
497
  }>;
488
498
  path: z.ZodString;
489
499
  }, z.core.$strict>, z.ZodObject<{
490
500
  operation: z.ZodEnum<{
491
- move: "move";
492
501
  copy: "copy";
502
+ move: "move";
493
503
  }>;
494
504
  oldPath: z.ZodString;
495
505
  path: z.ZodString;
@@ -526,11 +536,11 @@ export declare const SessionMessageSchema: z.ZodObject<{
526
536
  error: z.ZodString;
527
537
  }, z.core.$strict>]>>;
528
538
  stopReason: z.ZodOptional<z.ZodEnum<{
539
+ cancelled: "cancelled";
529
540
  "end-turn": "end-turn";
530
541
  "max-tokens": "max-tokens";
531
542
  "max-turn-requests": "max-turn-requests";
532
543
  refusal: "refusal";
533
- cancelled: "cancelled";
534
544
  }>>;
535
545
  metadata: z.ZodOptional<z.ZodObject<{
536
546
  custom: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
@@ -550,9 +560,9 @@ export declare const SessionPlanActivityMessageSchema: z.ZodObject<{
550
560
  label: z.ZodString;
551
561
  status: z.ZodEnum<{
552
562
  active: "active";
563
+ completed: "completed";
553
564
  failed: "failed";
554
565
  pending: "pending";
555
- completed: "completed";
556
566
  }>;
557
567
  }, z.core.$strict>>;
558
568
  }, z.core.$strict>;
@@ -563,9 +573,9 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
563
573
  messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
564
574
  id: z.ZodString;
565
575
  role: z.ZodEnum<{
566
- user: "user";
567
576
  assistant: "assistant";
568
577
  system: "system";
578
+ user: "user";
569
579
  }>;
570
580
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
571
581
  type: z.ZodLiteral<"text">;
@@ -586,15 +596,15 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
586
596
  result: z.ZodOptional<z.ZodJSONSchema>;
587
597
  isError: z.ZodOptional<z.ZodBoolean>;
588
598
  kind: z.ZodOptional<z.ZodEnum<{
589
- search: "search";
590
- read: "read";
591
- edit: "edit";
592
599
  delete: "delete";
593
- move: "move";
600
+ edit: "edit";
594
601
  execute: "execute";
595
- think: "think";
596
602
  fetch: "fetch";
603
+ move: "move";
597
604
  other: "other";
605
+ read: "read";
606
+ search: "search";
607
+ think: "think";
598
608
  }>>;
599
609
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
600
610
  path: z.ZodString;
@@ -603,15 +613,15 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
603
613
  diffs: z.ZodOptional<z.ZodArray<z.ZodObject<{
604
614
  changes: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
605
615
  operation: z.ZodEnum<{
606
- delete: "delete";
607
616
  add: "add";
617
+ delete: "delete";
608
618
  modify: "modify";
609
619
  }>;
610
620
  path: z.ZodString;
611
621
  }, z.core.$strict>, z.ZodObject<{
612
622
  operation: z.ZodEnum<{
613
- move: "move";
614
623
  copy: "copy";
624
+ move: "move";
615
625
  }>;
616
626
  oldPath: z.ZodString;
617
627
  path: z.ZodString;
@@ -648,11 +658,11 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
648
658
  error: z.ZodString;
649
659
  }, z.core.$strict>]>>;
650
660
  stopReason: z.ZodOptional<z.ZodEnum<{
661
+ cancelled: "cancelled";
651
662
  "end-turn": "end-turn";
652
663
  "max-tokens": "max-tokens";
653
664
  "max-turn-requests": "max-turn-requests";
654
665
  refusal: "refusal";
655
- cancelled: "cancelled";
656
666
  }>>;
657
667
  metadata: z.ZodOptional<z.ZodObject<{
658
668
  custom: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
@@ -670,9 +680,9 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
670
680
  label: z.ZodString;
671
681
  status: z.ZodEnum<{
672
682
  active: "active";
683
+ completed: "completed";
673
684
  failed: "failed";
674
685
  pending: "pending";
675
- completed: "completed";
676
686
  }>;
677
687
  }, z.core.$strict>>;
678
688
  }, z.core.$strict>;
@@ -684,11 +694,11 @@ export declare const SessionHistoryResponseSchema: z.ZodObject<{
684
694
  truncated: z.ZodOptional<z.ZodBoolean>;
685
695
  execution: z.ZodOptional<z.ZodObject<{
686
696
  status: z.ZodEnum<{
687
- unknown: "unknown";
697
+ failed: "failed";
688
698
  idle: "idle";
689
699
  running: "running";
700
+ unknown: "unknown";
690
701
  "waiting-for-input": "waiting-for-input";
691
- failed: "failed";
692
702
  }>;
693
703
  turnId: z.ZodOptional<z.ZodString>;
694
704
  }, z.core.$strict>>;
@@ -724,8 +734,8 @@ export declare const TurnSteerRequestSchema: z.ZodObject<{
724
734
  export type TurnSteerRequest = z.infer<typeof TurnSteerRequestSchema>;
725
735
  export declare const TurnSteerResponseSchema: z.ZodObject<{
726
736
  status: z.ZodEnum<{
727
- steered: "steered";
728
737
  queued: "queued";
738
+ steered: "steered";
729
739
  }>;
730
740
  }, z.core.$strict>;
731
741
  export type TurnSteerResponse = z.infer<typeof TurnSteerResponseSchema>;
@@ -826,9 +836,9 @@ export declare const SessionWorkspaceCapabilitiesResponseSchema: z.ZodObject<{
826
836
  scope: z.ZodLiteral<"turn">;
827
837
  answerModes: z.ZodTuple<[z.ZodLiteral<"single">, z.ZodLiteral<"multiple">, z.ZodLiteral<"free-text">], null>;
828
838
  cancellation: z.ZodEnum<{
839
+ "native-cancel": "native-cancel";
829
840
  "native-empty-answer": "native-empty-answer";
830
841
  "native-reject": "native-reject";
831
- "native-cancel": "native-cancel";
832
842
  }>;
833
843
  maxQuestions: z.ZodNumber;
834
844
  maxChoicesPerQuestion: z.ZodNumber;
@@ -984,9 +994,9 @@ export declare const GuestRuntimeCapabilitiesResponseSchema: z.ZodObject<{
984
994
  scope: z.ZodLiteral<"turn">;
985
995
  answerModes: z.ZodTuple<[z.ZodLiteral<"single">, z.ZodLiteral<"multiple">, z.ZodLiteral<"free-text">], null>;
986
996
  cancellation: z.ZodEnum<{
997
+ "native-cancel": "native-cancel";
987
998
  "native-empty-answer": "native-empty-answer";
988
999
  "native-reject": "native-reject";
989
- "native-cancel": "native-cancel";
990
1000
  }>;
991
1001
  maxQuestions: z.ZodNumber;
992
1002
  maxChoicesPerQuestion: z.ZodNumber;
@@ -1008,13 +1018,13 @@ export declare const GuestRuntimeCapabilitiesResponseSchema: z.ZodObject<{
1008
1018
  maxPending: z.ZodNumber;
1009
1019
  choices: z.ZodArray<z.ZodObject<{
1010
1020
  value: z.ZodEnum<{
1021
+ deny: "deny";
1011
1022
  once: "once";
1012
1023
  session: "session";
1013
- deny: "deny";
1014
1024
  }>;
1015
1025
  scope: z.ZodEnum<{
1016
- session: "session";
1017
1026
  request: "request";
1027
+ session: "session";
1018
1028
  }>;
1019
1029
  }, z.core.$strict>>;
1020
1030
  }, z.core.$strict>;
@@ -1059,9 +1069,9 @@ export declare const SessionContextResponseSchema: z.ZodObject<{
1059
1069
  maxTokens: z.ZodNumber;
1060
1070
  estimated: z.ZodOptional<z.ZodLiteral<true>>;
1061
1071
  source: z.ZodEnum<{
1072
+ "local-estimate": "local-estimate";
1062
1073
  "provider-usage": "provider-usage";
1063
1074
  "provider-usage-plus-estimate": "provider-usage-plus-estimate";
1064
- "local-estimate": "local-estimate";
1065
1075
  }>;
1066
1076
  breakdown: z.ZodOptional<z.ZodObject<{
1067
1077
  systemTokens: z.ZodNumber;
@@ -1087,8 +1097,8 @@ export declare const ArtifactDescriptorSchema: z.ZodObject<{
1087
1097
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1088
1098
  type: z.ZodLiteral<"inline">;
1089
1099
  encoding: z.ZodEnum<{
1090
- utf8: "utf8";
1091
1100
  base64: "base64";
1101
+ utf8: "utf8";
1092
1102
  }>;
1093
1103
  data: z.ZodString;
1094
1104
  }, z.core.$strict>, z.ZodObject<{
@@ -1106,9 +1116,9 @@ export declare const SessionTodosResponseSchema: z.ZodObject<{
1106
1116
  label: z.ZodString;
1107
1117
  status: z.ZodEnum<{
1108
1118
  active: "active";
1119
+ completed: "completed";
1109
1120
  failed: "failed";
1110
1121
  pending: "pending";
1111
- completed: "completed";
1112
1122
  }>;
1113
1123
  }, z.core.$strict>>;
1114
1124
  }, z.core.$strict>;
@@ -1116,8 +1126,8 @@ export type SessionTodosResponse = z.infer<typeof SessionTodosResponseSchema>;
1116
1126
  export declare const SessionActivityResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1117
1127
  status: z.ZodLiteral<"unavailable">;
1118
1128
  reason: z.ZodEnum<{
1119
- "session-not-resumed": "session-not-resumed";
1120
1129
  "session-idle": "session-idle";
1130
+ "session-not-resumed": "session-not-resumed";
1121
1131
  "session-state-unavailable": "session-state-unavailable";
1122
1132
  }>;
1123
1133
  }, z.core.$strict>, z.ZodObject<{
@@ -1125,9 +1135,9 @@ export declare const SessionActivityResponseSchema: z.ZodDiscriminatedUnion<[z.Z
1125
1135
  scope: z.ZodLiteral<"active-session">;
1126
1136
  coverage: z.ZodLiteral<"active-session-only">;
1127
1137
  state: z.ZodEnum<{
1128
- unknown: "unknown";
1129
1138
  idle: "idle";
1130
1139
  running: "running";
1140
+ unknown: "unknown";
1131
1141
  "waiting-for-input": "waiting-for-input";
1132
1142
  }>;
1133
1143
  }, z.core.$strict>], "status">;
@@ -1191,19 +1201,19 @@ export declare const SessionSpeechRequestSchema: z.ZodObject<{
1191
1201
  export declare const ErrorResponseSchema: z.ZodObject<{
1192
1202
  error: z.ZodObject<{
1193
1203
  code: z.ZodEnum<{
1194
- unauthenticated: "unauthenticated";
1195
1204
  forbidden: "forbidden";
1205
+ internal_error: "internal_error";
1196
1206
  invalid_request: "invalid_request";
1197
1207
  not_found: "not_found";
1198
- revision_conflict: "revision_conflict";
1199
- unsupported: "unsupported";
1200
- turn_conflict: "turn_conflict";
1201
- turn_capacity_exceeded: "turn_capacity_exceeded";
1202
1208
  registration_limit_exceeded: "registration_limit_exceeded";
1209
+ revision_conflict: "revision_conflict";
1203
1210
  runtime_authentication_required: "runtime_authentication_required";
1204
1211
  temporarily_unavailable: "temporarily_unavailable";
1212
+ turn_capacity_exceeded: "turn_capacity_exceeded";
1213
+ turn_conflict: "turn_conflict";
1214
+ unauthenticated: "unauthenticated";
1205
1215
  uncertain_mutation: "uncertain_mutation";
1206
- internal_error: "internal_error";
1216
+ unsupported: "unsupported";
1207
1217
  }>;
1208
1218
  description: z.ZodString;
1209
1219
  }, z.core.$strict>;
@@ -1,13 +1,17 @@
1
1
  import { z } from "zod";
2
2
  /**
3
3
  * Web Push contract shared by the browser, the service worker, and the gateway.
4
- * Content-free by construction: a category, a count, opaque ids when exactly
5
- * one Session is meant, a timestamp, and the device locale.
4
+ * One message is about one Session. It always carries the category, the Agent
5
+ * and Session ids, when the Session's newest event happened, and the device
6
+ * locale. A device whose registration is under 30 days old may also get the
7
+ * Agent's name, the Session's title, and a preview of what is asked: each one
8
+ * line, cut to its `PUSH_TEXT_LIMITS` entry, with credentials masked. Every
9
+ * encrypted message is padded to one size.
6
10
  */
7
11
  export declare const PushCategorySchema: z.ZodEnum<{
8
- input: "input";
9
- failure: "failure";
10
12
  completion: "completion";
13
+ failure: "failure";
14
+ input: "input";
11
15
  }>;
12
16
  export type PushCategory = z.infer<typeof PushCategorySchema>;
13
17
  /** Which category, if any, an execution or Agent lifecycle event notifies as. */
@@ -31,24 +35,40 @@ export declare const PRESENCE_GRACE_MS = 60000;
31
35
  * operator who really left is owed, inside a 3-second input window.
32
36
  */
33
37
  export declare const PRESENCE_CLOSED_GRACE_MS = 2000;
34
- /** Fixed window from the first event in which one push per category is sent. */
38
+ /**
39
+ * Fixed window from a category's first event. When it closes, each Session
40
+ * that had an event inside it gets one push, about its newest one.
41
+ */
35
42
  export declare const COALESCE_WINDOW_MS: Readonly<Record<PushCategory, number>>;
36
- /** The encrypted payload a device receives; ids are present iff count is 1. */
43
+ /** The longest each text field may be, in UTF-16 units, as zod's `.max` counts. */
44
+ export declare const PUSH_TEXT_LIMITS: {
45
+ readonly agentName: 64;
46
+ readonly sessionTitle: 120;
47
+ readonly requestText: 200;
48
+ };
49
+ /**
50
+ * The encrypted payload a device receives. `v` versions it on its own, apart
51
+ * from the ACP extension version; `requestMore` counts the questions asked
52
+ * after the one `requestText` previews.
53
+ */
37
54
  export declare const PushMessageSchema: z.ZodObject<{
38
- v: z.ZodLiteral<1>;
55
+ v: z.ZodLiteral<2>;
39
56
  category: z.ZodEnum<{
40
- input: "input";
41
- failure: "failure";
42
57
  completion: "completion";
58
+ failure: "failure";
59
+ input: "input";
43
60
  }>;
44
- count: z.ZodNumber;
45
- agentId: z.ZodOptional<z.ZodString>;
46
- sessionId: z.ZodOptional<z.ZodString>;
61
+ agentId: z.ZodString;
62
+ sessionId: z.ZodString;
47
63
  occurredAt: z.ZodISODateTime;
48
64
  locale: z.ZodEnum<{
49
65
  en: "en";
50
66
  he: "he";
51
67
  }>;
68
+ agentName: z.ZodOptional<z.ZodString>;
69
+ sessionTitle: z.ZodOptional<z.ZodString>;
70
+ requestText: z.ZodOptional<z.ZodString>;
71
+ requestMore: z.ZodOptional<z.ZodNumber>;
52
72
  }, z.core.$strict>;
53
73
  export type PushMessage = z.infer<typeof PushMessageSchema>;
54
74
  export declare const PushCategoriesSchema: z.ZodObject<{
@@ -112,6 +112,7 @@ import {
112
112
  parseArtifactUri2,
113
113
  HgwComposerPrefillNotificationSchema2,
114
114
  HgwErrorNotificationSchema2,
115
+ HGW_REQUEST_TEXT_MAX2,
115
116
  HgwActivityNotificationSchema2,
116
117
  PushCategorySchema2,
117
118
  categoryOf2,
@@ -121,6 +122,7 @@ import {
121
122
  PRESENCE_GRACE_MS2,
122
123
  PRESENCE_CLOSED_GRACE_MS2,
123
124
  COALESCE_WINDOW_MS2,
125
+ PUSH_TEXT_LIMITS2,
124
126
  PushMessageSchema2,
125
127
  PushCategoriesSchema2,
126
128
  PushSubscriptionJsonSchema2,
@@ -218,6 +220,7 @@ export {
218
220
  HGW_PERMISSION_KIND_SESSION2 as HGW_PERMISSION_KIND_SESSION,
219
221
  HGW_PLAN_ID2 as HGW_PLAN_ID,
220
222
  HGW_REPLAY_BEFORE2 as HGW_REPLAY_BEFORE,
223
+ HGW_REQUEST_TEXT_MAX2 as HGW_REQUEST_TEXT_MAX,
221
224
  HGW_STOP_REASONS2 as HGW_STOP_REASONS,
222
225
  HGW_SUBAGENT_STATUSES2 as HGW_SUBAGENT_STATUSES,
223
226
  HgwActivityNotificationSchema2 as HgwActivityNotificationSchema,
@@ -283,6 +286,7 @@ export {
283
286
  PRESENCE_GRACE_MS2 as PRESENCE_GRACE_MS,
284
287
  PRESENCE_HEARTBEAT_MS2 as PRESENCE_HEARTBEAT_MS,
285
288
  PRESENCE_IDLE_MS2 as PRESENCE_IDLE_MS,
289
+ PUSH_TEXT_LIMITS2 as PUSH_TEXT_LIMITS,
286
290
  PushCategoriesSchema2 as PushCategoriesSchema,
287
291
  PushCategorySchema2 as PushCategorySchema,
288
292
  PushInfoSchema2 as PushInfoSchema,