@dexto/core 1.6.18 → 1.6.19

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.
@@ -1,20 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  import type { JSONSchema7 } from 'json-schema';
3
- import { ApprovalType, ApprovalStatus, DenialReason } from './types.js';
4
3
  import type { ToolDisplayData } from '../tools/display-types.js';
5
4
  import type { ToolPresentationSnapshotV1 } from '../tools/types.js';
6
5
  /**
7
6
  * Schema for approval types
8
7
  */
9
- export declare const ApprovalTypeSchema: z.ZodNativeEnum<typeof ApprovalType>;
8
+ export declare const ApprovalTypeSchema: z.ZodEnum<["tool_confirmation", "command_confirmation", "elicitation", "directory_access", "custom"]>;
10
9
  /**
11
10
  * Schema for approval status
12
11
  */
13
- export declare const ApprovalStatusSchema: z.ZodNativeEnum<typeof ApprovalStatus>;
12
+ export declare const ApprovalStatusSchema: z.ZodEnum<["approved", "denied", "cancelled"]>;
14
13
  /**
15
14
  * Schema for denial/cancellation reasons
16
15
  */
17
- export declare const DenialReasonSchema: z.ZodNativeEnum<typeof DenialReason>;
16
+ export declare const DenialReasonSchema: z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>;
18
17
  /**
19
18
  * Directory access metadata schema
20
19
  * Used when a tool tries to access files outside the working directory
@@ -136,18 +135,18 @@ export declare const CustomApprovalMetadataSchema: z.ZodRecord<z.ZodString, z.Zo
136
135
  */
137
136
  export declare const BaseApprovalRequestSchema: z.ZodObject<{
138
137
  approvalId: z.ZodString;
139
- type: z.ZodNativeEnum<typeof ApprovalType>;
138
+ type: z.ZodEnum<["tool_confirmation", "command_confirmation", "elicitation", "directory_access", "custom"]>;
140
139
  sessionId: z.ZodOptional<z.ZodString>;
141
140
  timeout: z.ZodOptional<z.ZodNumber>;
142
141
  timestamp: z.ZodDate;
143
142
  }, "strip", z.ZodTypeAny, {
144
- type: ApprovalType;
143
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
145
144
  approvalId: string;
146
145
  timestamp: Date;
147
146
  timeout?: number | undefined;
148
147
  sessionId?: string | undefined;
149
148
  }, {
150
- type: ApprovalType;
149
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
151
150
  approvalId: string;
152
151
  timestamp: Date;
153
152
  timeout?: number | undefined;
@@ -162,7 +161,7 @@ export declare const ToolApprovalRequestSchema: z.ZodObject<{
162
161
  timeout: z.ZodOptional<z.ZodNumber>;
163
162
  timestamp: z.ZodDate;
164
163
  } & {
165
- type: z.ZodLiteral<ApprovalType.TOOL_APPROVAL>;
164
+ type: z.ZodLiteral<"tool_confirmation">;
166
165
  metadata: z.ZodObject<{
167
166
  toolName: z.ZodString;
168
167
  presentationSnapshot: z.ZodOptional<z.ZodType<ToolPresentationSnapshotV1, z.ZodTypeDef, ToolPresentationSnapshotV1>>;
@@ -217,7 +216,7 @@ export declare const ToolApprovalRequestSchema: z.ZodObject<{
217
216
  suggestedPatterns?: string[] | undefined;
218
217
  }>;
219
218
  }, "strict", z.ZodTypeAny, {
220
- type: ApprovalType.TOOL_APPROVAL;
219
+ type: "tool_confirmation";
221
220
  approvalId: string;
222
221
  timestamp: Date;
223
222
  metadata: {
@@ -238,7 +237,7 @@ export declare const ToolApprovalRequestSchema: z.ZodObject<{
238
237
  timeout?: number | undefined;
239
238
  sessionId?: string | undefined;
240
239
  }, {
241
- type: ApprovalType.TOOL_APPROVAL;
240
+ type: "tool_confirmation";
242
241
  approvalId: string;
243
242
  timestamp: Date;
244
243
  metadata: {
@@ -268,7 +267,7 @@ export declare const CommandConfirmationRequestSchema: z.ZodObject<{
268
267
  timeout: z.ZodOptional<z.ZodNumber>;
269
268
  timestamp: z.ZodDate;
270
269
  } & {
271
- type: z.ZodLiteral<ApprovalType.COMMAND_CONFIRMATION>;
270
+ type: z.ZodLiteral<"command_confirmation">;
272
271
  metadata: z.ZodObject<{
273
272
  toolName: z.ZodString;
274
273
  command: z.ZodString;
@@ -283,7 +282,7 @@ export declare const CommandConfirmationRequestSchema: z.ZodObject<{
283
282
  originalCommand?: string | undefined;
284
283
  }>;
285
284
  }, "strict", z.ZodTypeAny, {
286
- type: ApprovalType.COMMAND_CONFIRMATION;
285
+ type: "command_confirmation";
287
286
  approvalId: string;
288
287
  timestamp: Date;
289
288
  metadata: {
@@ -294,7 +293,7 @@ export declare const CommandConfirmationRequestSchema: z.ZodObject<{
294
293
  timeout?: number | undefined;
295
294
  sessionId?: string | undefined;
296
295
  }, {
297
- type: ApprovalType.COMMAND_CONFIRMATION;
296
+ type: "command_confirmation";
298
297
  approvalId: string;
299
298
  timestamp: Date;
300
299
  metadata: {
@@ -314,7 +313,7 @@ export declare const ElicitationRequestSchema: z.ZodObject<{
314
313
  timeout: z.ZodOptional<z.ZodNumber>;
315
314
  timestamp: z.ZodDate;
316
315
  } & {
317
- type: z.ZodLiteral<ApprovalType.ELICITATION>;
316
+ type: z.ZodLiteral<"elicitation">;
318
317
  metadata: z.ZodObject<{
319
318
  schema: z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>;
320
319
  prompt: z.ZodString;
@@ -332,7 +331,7 @@ export declare const ElicitationRequestSchema: z.ZodObject<{
332
331
  context?: Record<string, unknown> | undefined;
333
332
  }>;
334
333
  }, "strict", z.ZodTypeAny, {
335
- type: ApprovalType.ELICITATION;
334
+ type: "elicitation";
336
335
  approvalId: string;
337
336
  timestamp: Date;
338
337
  metadata: {
@@ -344,7 +343,7 @@ export declare const ElicitationRequestSchema: z.ZodObject<{
344
343
  timeout?: number | undefined;
345
344
  sessionId?: string | undefined;
346
345
  }, {
347
- type: ApprovalType.ELICITATION;
346
+ type: "elicitation";
348
347
  approvalId: string;
349
348
  timestamp: Date;
350
349
  metadata: {
@@ -365,17 +364,17 @@ export declare const CustomApprovalRequestSchema: z.ZodObject<{
365
364
  timeout: z.ZodOptional<z.ZodNumber>;
366
365
  timestamp: z.ZodDate;
367
366
  } & {
368
- type: z.ZodLiteral<ApprovalType.CUSTOM>;
367
+ type: z.ZodLiteral<"custom">;
369
368
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
370
369
  }, "strict", z.ZodTypeAny, {
371
- type: ApprovalType.CUSTOM;
370
+ type: "custom";
372
371
  approvalId: string;
373
372
  timestamp: Date;
374
373
  metadata: Record<string, unknown>;
375
374
  timeout?: number | undefined;
376
375
  sessionId?: string | undefined;
377
376
  }, {
378
- type: ApprovalType.CUSTOM;
377
+ type: "custom";
379
378
  approvalId: string;
380
379
  timestamp: Date;
381
380
  metadata: Record<string, unknown>;
@@ -391,7 +390,7 @@ export declare const DirectoryAccessRequestSchema: z.ZodObject<{
391
390
  timeout: z.ZodOptional<z.ZodNumber>;
392
391
  timestamp: z.ZodDate;
393
392
  } & {
394
- type: z.ZodLiteral<ApprovalType.DIRECTORY_ACCESS>;
393
+ type: z.ZodLiteral<"directory_access">;
395
394
  metadata: z.ZodObject<{
396
395
  path: z.ZodString;
397
396
  parentDir: z.ZodString;
@@ -409,7 +408,7 @@ export declare const DirectoryAccessRequestSchema: z.ZodObject<{
409
408
  toolName: string;
410
409
  }>;
411
410
  }, "strict", z.ZodTypeAny, {
412
- type: ApprovalType.DIRECTORY_ACCESS;
411
+ type: "directory_access";
413
412
  approvalId: string;
414
413
  timestamp: Date;
415
414
  metadata: {
@@ -421,7 +420,7 @@ export declare const DirectoryAccessRequestSchema: z.ZodObject<{
421
420
  timeout?: number | undefined;
422
421
  sessionId?: string | undefined;
423
422
  }, {
424
- type: ApprovalType.DIRECTORY_ACCESS;
423
+ type: "directory_access";
425
424
  approvalId: string;
426
425
  timestamp: Date;
427
426
  metadata: {
@@ -442,7 +441,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
442
441
  timeout: z.ZodOptional<z.ZodNumber>;
443
442
  timestamp: z.ZodDate;
444
443
  } & {
445
- type: z.ZodLiteral<ApprovalType.TOOL_APPROVAL>;
444
+ type: z.ZodLiteral<"tool_confirmation">;
446
445
  metadata: z.ZodObject<{
447
446
  toolName: z.ZodString;
448
447
  presentationSnapshot: z.ZodOptional<z.ZodType<ToolPresentationSnapshotV1, z.ZodTypeDef, ToolPresentationSnapshotV1>>;
@@ -497,7 +496,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
497
496
  suggestedPatterns?: string[] | undefined;
498
497
  }>;
499
498
  }, "strict", z.ZodTypeAny, {
500
- type: ApprovalType.TOOL_APPROVAL;
499
+ type: "tool_confirmation";
501
500
  approvalId: string;
502
501
  timestamp: Date;
503
502
  metadata: {
@@ -518,7 +517,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
518
517
  timeout?: number | undefined;
519
518
  sessionId?: string | undefined;
520
519
  }, {
521
- type: ApprovalType.TOOL_APPROVAL;
520
+ type: "tool_confirmation";
522
521
  approvalId: string;
523
522
  timestamp: Date;
524
523
  metadata: {
@@ -544,7 +543,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
544
543
  timeout: z.ZodOptional<z.ZodNumber>;
545
544
  timestamp: z.ZodDate;
546
545
  } & {
547
- type: z.ZodLiteral<ApprovalType.COMMAND_CONFIRMATION>;
546
+ type: z.ZodLiteral<"command_confirmation">;
548
547
  metadata: z.ZodObject<{
549
548
  toolName: z.ZodString;
550
549
  command: z.ZodString;
@@ -559,7 +558,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
559
558
  originalCommand?: string | undefined;
560
559
  }>;
561
560
  }, "strict", z.ZodTypeAny, {
562
- type: ApprovalType.COMMAND_CONFIRMATION;
561
+ type: "command_confirmation";
563
562
  approvalId: string;
564
563
  timestamp: Date;
565
564
  metadata: {
@@ -570,7 +569,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
570
569
  timeout?: number | undefined;
571
570
  sessionId?: string | undefined;
572
571
  }, {
573
- type: ApprovalType.COMMAND_CONFIRMATION;
572
+ type: "command_confirmation";
574
573
  approvalId: string;
575
574
  timestamp: Date;
576
575
  metadata: {
@@ -586,7 +585,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
586
585
  timeout: z.ZodOptional<z.ZodNumber>;
587
586
  timestamp: z.ZodDate;
588
587
  } & {
589
- type: z.ZodLiteral<ApprovalType.ELICITATION>;
588
+ type: z.ZodLiteral<"elicitation">;
590
589
  metadata: z.ZodObject<{
591
590
  schema: z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>;
592
591
  prompt: z.ZodString;
@@ -604,7 +603,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
604
603
  context?: Record<string, unknown> | undefined;
605
604
  }>;
606
605
  }, "strict", z.ZodTypeAny, {
607
- type: ApprovalType.ELICITATION;
606
+ type: "elicitation";
608
607
  approvalId: string;
609
608
  timestamp: Date;
610
609
  metadata: {
@@ -616,7 +615,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
616
615
  timeout?: number | undefined;
617
616
  sessionId?: string | undefined;
618
617
  }, {
619
- type: ApprovalType.ELICITATION;
618
+ type: "elicitation";
620
619
  approvalId: string;
621
620
  timestamp: Date;
622
621
  metadata: {
@@ -633,17 +632,17 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
633
632
  timeout: z.ZodOptional<z.ZodNumber>;
634
633
  timestamp: z.ZodDate;
635
634
  } & {
636
- type: z.ZodLiteral<ApprovalType.CUSTOM>;
635
+ type: z.ZodLiteral<"custom">;
637
636
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
638
637
  }, "strict", z.ZodTypeAny, {
639
- type: ApprovalType.CUSTOM;
638
+ type: "custom";
640
639
  approvalId: string;
641
640
  timestamp: Date;
642
641
  metadata: Record<string, unknown>;
643
642
  timeout?: number | undefined;
644
643
  sessionId?: string | undefined;
645
644
  }, {
646
- type: ApprovalType.CUSTOM;
645
+ type: "custom";
647
646
  approvalId: string;
648
647
  timestamp: Date;
649
648
  metadata: Record<string, unknown>;
@@ -655,7 +654,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
655
654
  timeout: z.ZodOptional<z.ZodNumber>;
656
655
  timestamp: z.ZodDate;
657
656
  } & {
658
- type: z.ZodLiteral<ApprovalType.DIRECTORY_ACCESS>;
657
+ type: z.ZodLiteral<"directory_access">;
659
658
  metadata: z.ZodObject<{
660
659
  path: z.ZodString;
661
660
  parentDir: z.ZodString;
@@ -673,7 +672,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
673
672
  toolName: string;
674
673
  }>;
675
674
  }, "strict", z.ZodTypeAny, {
676
- type: ApprovalType.DIRECTORY_ACCESS;
675
+ type: "directory_access";
677
676
  approvalId: string;
678
677
  timestamp: Date;
679
678
  metadata: {
@@ -685,7 +684,7 @@ export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<"type", [z.Z
685
684
  timeout?: number | undefined;
686
685
  sessionId?: string | undefined;
687
686
  }, {
688
- type: ApprovalType.DIRECTORY_ACCESS;
687
+ type: "directory_access";
689
688
  approvalId: string;
690
689
  timestamp: Date;
691
690
  metadata: {
@@ -746,24 +745,24 @@ export declare const DirectoryAccessResponseDataSchema: z.ZodObject<{
746
745
  */
747
746
  export declare const BaseApprovalResponseSchema: z.ZodObject<{
748
747
  approvalId: z.ZodString;
749
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
748
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
750
749
  sessionId: z.ZodOptional<z.ZodString>;
751
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
750
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
752
751
  message: z.ZodOptional<z.ZodString>;
753
752
  timeoutMs: z.ZodOptional<z.ZodNumber>;
754
753
  }, "strip", z.ZodTypeAny, {
755
- status: ApprovalStatus;
754
+ status: "approved" | "denied" | "cancelled";
756
755
  approvalId: string;
757
756
  message?: string | undefined;
758
757
  sessionId?: string | undefined;
759
- reason?: DenialReason | undefined;
758
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
760
759
  timeoutMs?: number | undefined;
761
760
  }, {
762
- status: ApprovalStatus;
761
+ status: "approved" | "denied" | "cancelled";
763
762
  approvalId: string;
764
763
  message?: string | undefined;
765
764
  sessionId?: string | undefined;
766
- reason?: DenialReason | undefined;
765
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
767
766
  timeoutMs?: number | undefined;
768
767
  }>;
769
768
  /**
@@ -771,9 +770,9 @@ export declare const BaseApprovalResponseSchema: z.ZodObject<{
771
770
  */
772
771
  export declare const ToolApprovalResponseSchema: z.ZodObject<{
773
772
  approvalId: z.ZodString;
774
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
773
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
775
774
  sessionId: z.ZodOptional<z.ZodString>;
776
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
775
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
777
776
  message: z.ZodOptional<z.ZodString>;
778
777
  timeoutMs: z.ZodOptional<z.ZodNumber>;
779
778
  } & {
@@ -791,7 +790,7 @@ export declare const ToolApprovalResponseSchema: z.ZodObject<{
791
790
  rememberDirectory?: boolean | undefined;
792
791
  }>>;
793
792
  }, "strict", z.ZodTypeAny, {
794
- status: ApprovalStatus;
793
+ status: "approved" | "denied" | "cancelled";
795
794
  approvalId: string;
796
795
  data?: {
797
796
  rememberChoice?: boolean | undefined;
@@ -800,10 +799,10 @@ export declare const ToolApprovalResponseSchema: z.ZodObject<{
800
799
  } | undefined;
801
800
  message?: string | undefined;
802
801
  sessionId?: string | undefined;
803
- reason?: DenialReason | undefined;
802
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
804
803
  timeoutMs?: number | undefined;
805
804
  }, {
806
- status: ApprovalStatus;
805
+ status: "approved" | "denied" | "cancelled";
807
806
  approvalId: string;
808
807
  data?: {
809
808
  rememberChoice?: boolean | undefined;
@@ -812,7 +811,7 @@ export declare const ToolApprovalResponseSchema: z.ZodObject<{
812
811
  } | undefined;
813
812
  message?: string | undefined;
814
813
  sessionId?: string | undefined;
815
- reason?: DenialReason | undefined;
814
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
816
815
  timeoutMs?: number | undefined;
817
816
  }>;
818
817
  /**
@@ -820,28 +819,28 @@ export declare const ToolApprovalResponseSchema: z.ZodObject<{
820
819
  */
821
820
  export declare const CommandConfirmationResponseSchema: z.ZodObject<{
822
821
  approvalId: z.ZodString;
823
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
822
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
824
823
  sessionId: z.ZodOptional<z.ZodString>;
825
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
824
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
826
825
  message: z.ZodOptional<z.ZodString>;
827
826
  timeoutMs: z.ZodOptional<z.ZodNumber>;
828
827
  } & {
829
828
  data: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
830
829
  }, "strict", z.ZodTypeAny, {
831
- status: ApprovalStatus;
830
+ status: "approved" | "denied" | "cancelled";
832
831
  approvalId: string;
833
832
  data?: {} | undefined;
834
833
  message?: string | undefined;
835
834
  sessionId?: string | undefined;
836
- reason?: DenialReason | undefined;
835
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
837
836
  timeoutMs?: number | undefined;
838
837
  }, {
839
- status: ApprovalStatus;
838
+ status: "approved" | "denied" | "cancelled";
840
839
  approvalId: string;
841
840
  data?: {} | undefined;
842
841
  message?: string | undefined;
843
842
  sessionId?: string | undefined;
844
- reason?: DenialReason | undefined;
843
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
845
844
  timeoutMs?: number | undefined;
846
845
  }>;
847
846
  /**
@@ -849,9 +848,9 @@ export declare const CommandConfirmationResponseSchema: z.ZodObject<{
849
848
  */
850
849
  export declare const ElicitationResponseSchema: z.ZodObject<{
851
850
  approvalId: z.ZodString;
852
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
851
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
853
852
  sessionId: z.ZodOptional<z.ZodString>;
854
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
853
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
855
854
  message: z.ZodOptional<z.ZodString>;
856
855
  timeoutMs: z.ZodOptional<z.ZodNumber>;
857
856
  } & {
@@ -863,24 +862,24 @@ export declare const ElicitationResponseSchema: z.ZodObject<{
863
862
  formData: Record<string, unknown>;
864
863
  }>>;
865
864
  }, "strict", z.ZodTypeAny, {
866
- status: ApprovalStatus;
865
+ status: "approved" | "denied" | "cancelled";
867
866
  approvalId: string;
868
867
  data?: {
869
868
  formData: Record<string, unknown>;
870
869
  } | undefined;
871
870
  message?: string | undefined;
872
871
  sessionId?: string | undefined;
873
- reason?: DenialReason | undefined;
872
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
874
873
  timeoutMs?: number | undefined;
875
874
  }, {
876
- status: ApprovalStatus;
875
+ status: "approved" | "denied" | "cancelled";
877
876
  approvalId: string;
878
877
  data?: {
879
878
  formData: Record<string, unknown>;
880
879
  } | undefined;
881
880
  message?: string | undefined;
882
881
  sessionId?: string | undefined;
883
- reason?: DenialReason | undefined;
882
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
884
883
  timeoutMs?: number | undefined;
885
884
  }>;
886
885
  /**
@@ -888,28 +887,28 @@ export declare const ElicitationResponseSchema: z.ZodObject<{
888
887
  */
889
888
  export declare const CustomApprovalResponseSchema: z.ZodObject<{
890
889
  approvalId: z.ZodString;
891
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
890
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
892
891
  sessionId: z.ZodOptional<z.ZodString>;
893
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
892
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
894
893
  message: z.ZodOptional<z.ZodString>;
895
894
  timeoutMs: z.ZodOptional<z.ZodNumber>;
896
895
  } & {
897
896
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
898
897
  }, "strict", z.ZodTypeAny, {
899
- status: ApprovalStatus;
898
+ status: "approved" | "denied" | "cancelled";
900
899
  approvalId: string;
901
900
  data?: Record<string, unknown> | undefined;
902
901
  message?: string | undefined;
903
902
  sessionId?: string | undefined;
904
- reason?: DenialReason | undefined;
903
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
905
904
  timeoutMs?: number | undefined;
906
905
  }, {
907
- status: ApprovalStatus;
906
+ status: "approved" | "denied" | "cancelled";
908
907
  approvalId: string;
909
908
  data?: Record<string, unknown> | undefined;
910
909
  message?: string | undefined;
911
910
  sessionId?: string | undefined;
912
- reason?: DenialReason | undefined;
911
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
913
912
  timeoutMs?: number | undefined;
914
913
  }>;
915
914
  /**
@@ -917,9 +916,9 @@ export declare const CustomApprovalResponseSchema: z.ZodObject<{
917
916
  */
918
917
  export declare const DirectoryAccessResponseSchema: z.ZodObject<{
919
918
  approvalId: z.ZodString;
920
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
919
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
921
920
  sessionId: z.ZodOptional<z.ZodString>;
922
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
921
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
923
922
  message: z.ZodOptional<z.ZodString>;
924
923
  timeoutMs: z.ZodOptional<z.ZodNumber>;
925
924
  } & {
@@ -931,24 +930,24 @@ export declare const DirectoryAccessResponseSchema: z.ZodObject<{
931
930
  rememberDirectory?: boolean | undefined;
932
931
  }>>;
933
932
  }, "strict", z.ZodTypeAny, {
934
- status: ApprovalStatus;
933
+ status: "approved" | "denied" | "cancelled";
935
934
  approvalId: string;
936
935
  data?: {
937
936
  rememberDirectory?: boolean | undefined;
938
937
  } | undefined;
939
938
  message?: string | undefined;
940
939
  sessionId?: string | undefined;
941
- reason?: DenialReason | undefined;
940
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
942
941
  timeoutMs?: number | undefined;
943
942
  }, {
944
- status: ApprovalStatus;
943
+ status: "approved" | "denied" | "cancelled";
945
944
  approvalId: string;
946
945
  data?: {
947
946
  rememberDirectory?: boolean | undefined;
948
947
  } | undefined;
949
948
  message?: string | undefined;
950
949
  sessionId?: string | undefined;
951
- reason?: DenialReason | undefined;
950
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
952
951
  timeoutMs?: number | undefined;
953
952
  }>;
954
953
  /**
@@ -956,9 +955,9 @@ export declare const DirectoryAccessResponseSchema: z.ZodObject<{
956
955
  */
957
956
  export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
958
957
  approvalId: z.ZodString;
959
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
958
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
960
959
  sessionId: z.ZodOptional<z.ZodString>;
961
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
960
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
962
961
  message: z.ZodOptional<z.ZodString>;
963
962
  timeoutMs: z.ZodOptional<z.ZodNumber>;
964
963
  } & {
@@ -976,7 +975,7 @@ export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
976
975
  rememberDirectory?: boolean | undefined;
977
976
  }>>;
978
977
  }, "strict", z.ZodTypeAny, {
979
- status: ApprovalStatus;
978
+ status: "approved" | "denied" | "cancelled";
980
979
  approvalId: string;
981
980
  data?: {
982
981
  rememberChoice?: boolean | undefined;
@@ -985,10 +984,10 @@ export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
985
984
  } | undefined;
986
985
  message?: string | undefined;
987
986
  sessionId?: string | undefined;
988
- reason?: DenialReason | undefined;
987
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
989
988
  timeoutMs?: number | undefined;
990
989
  }, {
991
- status: ApprovalStatus;
990
+ status: "approved" | "denied" | "cancelled";
992
991
  approvalId: string;
993
992
  data?: {
994
993
  rememberChoice?: boolean | undefined;
@@ -997,38 +996,38 @@ export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
997
996
  } | undefined;
998
997
  message?: string | undefined;
999
998
  sessionId?: string | undefined;
1000
- reason?: DenialReason | undefined;
999
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1001
1000
  timeoutMs?: number | undefined;
1002
1001
  }>, z.ZodObject<{
1003
1002
  approvalId: z.ZodString;
1004
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
1003
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
1005
1004
  sessionId: z.ZodOptional<z.ZodString>;
1006
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
1005
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
1007
1006
  message: z.ZodOptional<z.ZodString>;
1008
1007
  timeoutMs: z.ZodOptional<z.ZodNumber>;
1009
1008
  } & {
1010
1009
  data: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
1011
1010
  }, "strict", z.ZodTypeAny, {
1012
- status: ApprovalStatus;
1011
+ status: "approved" | "denied" | "cancelled";
1013
1012
  approvalId: string;
1014
1013
  data?: {} | undefined;
1015
1014
  message?: string | undefined;
1016
1015
  sessionId?: string | undefined;
1017
- reason?: DenialReason | undefined;
1016
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1018
1017
  timeoutMs?: number | undefined;
1019
1018
  }, {
1020
- status: ApprovalStatus;
1019
+ status: "approved" | "denied" | "cancelled";
1021
1020
  approvalId: string;
1022
1021
  data?: {} | undefined;
1023
1022
  message?: string | undefined;
1024
1023
  sessionId?: string | undefined;
1025
- reason?: DenialReason | undefined;
1024
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1026
1025
  timeoutMs?: number | undefined;
1027
1026
  }>, z.ZodObject<{
1028
1027
  approvalId: z.ZodString;
1029
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
1028
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
1030
1029
  sessionId: z.ZodOptional<z.ZodString>;
1031
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
1030
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
1032
1031
  message: z.ZodOptional<z.ZodString>;
1033
1032
  timeoutMs: z.ZodOptional<z.ZodNumber>;
1034
1033
  } & {
@@ -1040,55 +1039,55 @@ export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
1040
1039
  formData: Record<string, unknown>;
1041
1040
  }>>;
1042
1041
  }, "strict", z.ZodTypeAny, {
1043
- status: ApprovalStatus;
1042
+ status: "approved" | "denied" | "cancelled";
1044
1043
  approvalId: string;
1045
1044
  data?: {
1046
1045
  formData: Record<string, unknown>;
1047
1046
  } | undefined;
1048
1047
  message?: string | undefined;
1049
1048
  sessionId?: string | undefined;
1050
- reason?: DenialReason | undefined;
1049
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1051
1050
  timeoutMs?: number | undefined;
1052
1051
  }, {
1053
- status: ApprovalStatus;
1052
+ status: "approved" | "denied" | "cancelled";
1054
1053
  approvalId: string;
1055
1054
  data?: {
1056
1055
  formData: Record<string, unknown>;
1057
1056
  } | undefined;
1058
1057
  message?: string | undefined;
1059
1058
  sessionId?: string | undefined;
1060
- reason?: DenialReason | undefined;
1059
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1061
1060
  timeoutMs?: number | undefined;
1062
1061
  }>, z.ZodObject<{
1063
1062
  approvalId: z.ZodString;
1064
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
1063
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
1065
1064
  sessionId: z.ZodOptional<z.ZodString>;
1066
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
1065
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
1067
1066
  message: z.ZodOptional<z.ZodString>;
1068
1067
  timeoutMs: z.ZodOptional<z.ZodNumber>;
1069
1068
  } & {
1070
1069
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1071
1070
  }, "strict", z.ZodTypeAny, {
1072
- status: ApprovalStatus;
1071
+ status: "approved" | "denied" | "cancelled";
1073
1072
  approvalId: string;
1074
1073
  data?: Record<string, unknown> | undefined;
1075
1074
  message?: string | undefined;
1076
1075
  sessionId?: string | undefined;
1077
- reason?: DenialReason | undefined;
1076
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1078
1077
  timeoutMs?: number | undefined;
1079
1078
  }, {
1080
- status: ApprovalStatus;
1079
+ status: "approved" | "denied" | "cancelled";
1081
1080
  approvalId: string;
1082
1081
  data?: Record<string, unknown> | undefined;
1083
1082
  message?: string | undefined;
1084
1083
  sessionId?: string | undefined;
1085
- reason?: DenialReason | undefined;
1084
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1086
1085
  timeoutMs?: number | undefined;
1087
1086
  }>, z.ZodObject<{
1088
1087
  approvalId: z.ZodString;
1089
- status: z.ZodNativeEnum<typeof ApprovalStatus>;
1088
+ status: z.ZodEnum<["approved", "denied", "cancelled"]>;
1090
1089
  sessionId: z.ZodOptional<z.ZodString>;
1091
- reason: z.ZodOptional<z.ZodNativeEnum<typeof DenialReason>>;
1090
+ reason: z.ZodOptional<z.ZodEnum<["user_denied", "system_denied", "timeout", "user_cancelled", "system_cancelled", "validation_failed", "elicitation_disabled"]>>;
1092
1091
  message: z.ZodOptional<z.ZodString>;
1093
1092
  timeoutMs: z.ZodOptional<z.ZodNumber>;
1094
1093
  } & {
@@ -1100,31 +1099,31 @@ export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
1100
1099
  rememberDirectory?: boolean | undefined;
1101
1100
  }>>;
1102
1101
  }, "strict", z.ZodTypeAny, {
1103
- status: ApprovalStatus;
1102
+ status: "approved" | "denied" | "cancelled";
1104
1103
  approvalId: string;
1105
1104
  data?: {
1106
1105
  rememberDirectory?: boolean | undefined;
1107
1106
  } | undefined;
1108
1107
  message?: string | undefined;
1109
1108
  sessionId?: string | undefined;
1110
- reason?: DenialReason | undefined;
1109
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1111
1110
  timeoutMs?: number | undefined;
1112
1111
  }, {
1113
- status: ApprovalStatus;
1112
+ status: "approved" | "denied" | "cancelled";
1114
1113
  approvalId: string;
1115
1114
  data?: {
1116
1115
  rememberDirectory?: boolean | undefined;
1117
1116
  } | undefined;
1118
1117
  message?: string | undefined;
1119
1118
  sessionId?: string | undefined;
1120
- reason?: DenialReason | undefined;
1119
+ reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
1121
1120
  timeoutMs?: number | undefined;
1122
1121
  }>]>;
1123
1122
  /**
1124
1123
  * Approval request details schema for creating requests
1125
1124
  */
1126
1125
  export declare const ApprovalRequestDetailsSchema: z.ZodEffects<z.ZodObject<{
1127
- type: z.ZodNativeEnum<typeof ApprovalType>;
1126
+ type: z.ZodEnum<["tool_confirmation", "command_confirmation", "elicitation", "directory_access", "custom"]>;
1128
1127
  sessionId: z.ZodOptional<z.ZodString>;
1129
1128
  timeout: z.ZodOptional<z.ZodNumber>;
1130
1129
  metadata: z.ZodUnion<[z.ZodObject<{
@@ -1223,7 +1222,7 @@ export declare const ApprovalRequestDetailsSchema: z.ZodEffects<z.ZodObject<{
1223
1222
  toolName: string;
1224
1223
  }>]>;
1225
1224
  }, "strip", z.ZodTypeAny, {
1226
- type: ApprovalType;
1225
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
1227
1226
  metadata: Record<string, unknown> | {
1228
1227
  path: string;
1229
1228
  parentDir: string;
@@ -1256,7 +1255,7 @@ export declare const ApprovalRequestDetailsSchema: z.ZodEffects<z.ZodObject<{
1256
1255
  timeout?: number | undefined;
1257
1256
  sessionId?: string | undefined;
1258
1257
  }, {
1259
- type: ApprovalType;
1258
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
1260
1259
  metadata: Record<string, unknown> | {
1261
1260
  path: string;
1262
1261
  parentDir: string;
@@ -1289,7 +1288,7 @@ export declare const ApprovalRequestDetailsSchema: z.ZodEffects<z.ZodObject<{
1289
1288
  timeout?: number | undefined;
1290
1289
  sessionId?: string | undefined;
1291
1290
  }>, {
1292
- type: ApprovalType;
1291
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
1293
1292
  metadata: Record<string, unknown> | {
1294
1293
  path: string;
1295
1294
  parentDir: string;
@@ -1322,7 +1321,7 @@ export declare const ApprovalRequestDetailsSchema: z.ZodEffects<z.ZodObject<{
1322
1321
  timeout?: number | undefined;
1323
1322
  sessionId?: string | undefined;
1324
1323
  }, {
1325
- type: ApprovalType;
1324
+ type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
1326
1325
  metadata: Record<string, unknown> | {
1327
1326
  path: string;
1328
1327
  parentDir: string;