@linkshell/gateway 0.2.27 → 0.2.28

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.
@@ -602,6 +602,577 @@ export declare const terminalHistoryResponsePayloadSchema: z.ZodObject<{
602
602
  entries: string[];
603
603
  shell?: string | undefined;
604
604
  }>;
605
+ export declare const agentProviderSchema: z.ZodEnum<["codex", "claude", "custom"]>;
606
+ export declare const agentContentBlockSchema: z.ZodObject<{
607
+ type: z.ZodEnum<["text", "image"]>;
608
+ text: z.ZodOptional<z.ZodString>;
609
+ data: z.ZodOptional<z.ZodString>;
610
+ mimeType: z.ZodOptional<z.ZodString>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ type: "text" | "image";
613
+ data?: string | undefined;
614
+ text?: string | undefined;
615
+ mimeType?: string | undefined;
616
+ }, {
617
+ type: "text" | "image";
618
+ data?: string | undefined;
619
+ text?: string | undefined;
620
+ mimeType?: string | undefined;
621
+ }>;
622
+ export declare const agentMessageSchema: z.ZodObject<{
623
+ id: z.ZodString;
624
+ role: z.ZodEnum<["user", "assistant", "system"]>;
625
+ content: z.ZodString;
626
+ createdAt: z.ZodNumber;
627
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
628
+ }, "strip", z.ZodTypeAny, {
629
+ id: string;
630
+ role: "user" | "assistant" | "system";
631
+ content: string;
632
+ createdAt: number;
633
+ isStreaming?: boolean | undefined;
634
+ }, {
635
+ id: string;
636
+ role: "user" | "assistant" | "system";
637
+ content: string;
638
+ createdAt: number;
639
+ isStreaming?: boolean | undefined;
640
+ }>;
641
+ export declare const agentToolCallSchema: z.ZodObject<{
642
+ id: z.ZodString;
643
+ name: z.ZodString;
644
+ input: z.ZodOptional<z.ZodString>;
645
+ output: z.ZodOptional<z.ZodString>;
646
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ status: "running" | "pending" | "completed" | "failed";
649
+ id: string;
650
+ name: string;
651
+ input?: string | undefined;
652
+ output?: string | undefined;
653
+ }, {
654
+ id: string;
655
+ name: string;
656
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
657
+ input?: string | undefined;
658
+ output?: string | undefined;
659
+ }>;
660
+ export declare const agentPermissionSchema: z.ZodObject<{
661
+ requestId: z.ZodString;
662
+ toolName: z.ZodOptional<z.ZodString>;
663
+ toolInput: z.ZodOptional<z.ZodString>;
664
+ context: z.ZodOptional<z.ZodString>;
665
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
666
+ id: z.ZodString;
667
+ label: z.ZodString;
668
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ id: string;
671
+ kind: "allow" | "deny" | "other";
672
+ label: string;
673
+ }, {
674
+ id: string;
675
+ label: string;
676
+ kind?: "allow" | "deny" | "other" | undefined;
677
+ }>, "many">>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ options: {
680
+ id: string;
681
+ kind: "allow" | "deny" | "other";
682
+ label: string;
683
+ }[];
684
+ requestId: string;
685
+ toolName?: string | undefined;
686
+ toolInput?: string | undefined;
687
+ context?: string | undefined;
688
+ }, {
689
+ requestId: string;
690
+ options?: {
691
+ id: string;
692
+ label: string;
693
+ kind?: "allow" | "deny" | "other" | undefined;
694
+ }[] | undefined;
695
+ toolName?: string | undefined;
696
+ toolInput?: string | undefined;
697
+ context?: string | undefined;
698
+ }>;
699
+ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
700
+ enabled: z.ZodBoolean;
701
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
702
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
703
+ error: z.ZodOptional<z.ZodString>;
704
+ supportsSessionList: z.ZodDefault<z.ZodBoolean>;
705
+ supportsSessionLoad: z.ZodDefault<z.ZodBoolean>;
706
+ supportsImages: z.ZodDefault<z.ZodBoolean>;
707
+ supportsAudio: z.ZodDefault<z.ZodBoolean>;
708
+ supportsPermission: z.ZodDefault<z.ZodBoolean>;
709
+ supportsPlan: z.ZodDefault<z.ZodBoolean>;
710
+ supportsCancel: z.ZodDefault<z.ZodBoolean>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ enabled: boolean;
713
+ supportsSessionList: boolean;
714
+ supportsSessionLoad: boolean;
715
+ supportsImages: boolean;
716
+ supportsAudio: boolean;
717
+ supportsPermission: boolean;
718
+ supportsPlan: boolean;
719
+ supportsCancel: boolean;
720
+ error?: string | undefined;
721
+ provider?: "claude" | "codex" | "custom" | undefined;
722
+ protocolVersion?: number | undefined;
723
+ }, {
724
+ enabled: boolean;
725
+ error?: string | undefined;
726
+ provider?: "claude" | "codex" | "custom" | undefined;
727
+ protocolVersion?: number | undefined;
728
+ supportsSessionList?: boolean | undefined;
729
+ supportsSessionLoad?: boolean | undefined;
730
+ supportsImages?: boolean | undefined;
731
+ supportsAudio?: boolean | undefined;
732
+ supportsPermission?: boolean | undefined;
733
+ supportsPlan?: boolean | undefined;
734
+ supportsCancel?: boolean | undefined;
735
+ }>;
736
+ export declare const agentInitializePayloadSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
737
+ export declare const agentSessionNewPayloadSchema: z.ZodObject<{
738
+ cwd: z.ZodOptional<z.ZodString>;
739
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
740
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ provider?: "claude" | "codex" | "custom" | undefined;
743
+ cwd?: string | undefined;
744
+ mcpServers?: Record<string, unknown> | undefined;
745
+ }, {
746
+ provider?: "claude" | "codex" | "custom" | undefined;
747
+ cwd?: string | undefined;
748
+ mcpServers?: Record<string, unknown> | undefined;
749
+ }>;
750
+ export declare const agentSessionLoadPayloadSchema: z.ZodObject<{
751
+ agentSessionId: z.ZodString;
752
+ cwd: z.ZodOptional<z.ZodString>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ agentSessionId: string;
755
+ cwd?: string | undefined;
756
+ }, {
757
+ agentSessionId: string;
758
+ cwd?: string | undefined;
759
+ }>;
760
+ export declare const agentSessionListPayloadSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
761
+ export declare const agentPromptPayloadSchema: z.ZodObject<{
762
+ agentSessionId: z.ZodOptional<z.ZodString>;
763
+ clientMessageId: z.ZodString;
764
+ contentBlocks: z.ZodArray<z.ZodObject<{
765
+ type: z.ZodEnum<["text", "image"]>;
766
+ text: z.ZodOptional<z.ZodString>;
767
+ data: z.ZodOptional<z.ZodString>;
768
+ mimeType: z.ZodOptional<z.ZodString>;
769
+ }, "strip", z.ZodTypeAny, {
770
+ type: "text" | "image";
771
+ data?: string | undefined;
772
+ text?: string | undefined;
773
+ mimeType?: string | undefined;
774
+ }, {
775
+ type: "text" | "image";
776
+ data?: string | undefined;
777
+ text?: string | undefined;
778
+ mimeType?: string | undefined;
779
+ }>, "many">;
780
+ }, "strip", z.ZodTypeAny, {
781
+ clientMessageId: string;
782
+ contentBlocks: {
783
+ type: "text" | "image";
784
+ data?: string | undefined;
785
+ text?: string | undefined;
786
+ mimeType?: string | undefined;
787
+ }[];
788
+ agentSessionId?: string | undefined;
789
+ }, {
790
+ clientMessageId: string;
791
+ contentBlocks: {
792
+ type: "text" | "image";
793
+ data?: string | undefined;
794
+ text?: string | undefined;
795
+ mimeType?: string | undefined;
796
+ }[];
797
+ agentSessionId?: string | undefined;
798
+ }>;
799
+ export declare const agentCancelPayloadSchema: z.ZodObject<{
800
+ agentSessionId: z.ZodOptional<z.ZodString>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ agentSessionId?: string | undefined;
803
+ }, {
804
+ agentSessionId?: string | undefined;
805
+ }>;
806
+ export declare const agentUpdatePayloadSchema: z.ZodObject<{
807
+ agentSessionId: z.ZodOptional<z.ZodString>;
808
+ kind: z.ZodEnum<["message", "message_delta", "tool_call", "tool_result", "plan", "status", "error"]>;
809
+ message: z.ZodOptional<z.ZodObject<{
810
+ id: z.ZodString;
811
+ role: z.ZodEnum<["user", "assistant", "system"]>;
812
+ content: z.ZodString;
813
+ createdAt: z.ZodNumber;
814
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
815
+ }, "strip", z.ZodTypeAny, {
816
+ id: string;
817
+ role: "user" | "assistant" | "system";
818
+ content: string;
819
+ createdAt: number;
820
+ isStreaming?: boolean | undefined;
821
+ }, {
822
+ id: string;
823
+ role: "user" | "assistant" | "system";
824
+ content: string;
825
+ createdAt: number;
826
+ isStreaming?: boolean | undefined;
827
+ }>>;
828
+ delta: z.ZodOptional<z.ZodString>;
829
+ toolCall: z.ZodOptional<z.ZodObject<{
830
+ id: z.ZodString;
831
+ name: z.ZodString;
832
+ input: z.ZodOptional<z.ZodString>;
833
+ output: z.ZodOptional<z.ZodString>;
834
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
835
+ }, "strip", z.ZodTypeAny, {
836
+ status: "running" | "pending" | "completed" | "failed";
837
+ id: string;
838
+ name: string;
839
+ input?: string | undefined;
840
+ output?: string | undefined;
841
+ }, {
842
+ id: string;
843
+ name: string;
844
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
845
+ input?: string | undefined;
846
+ output?: string | undefined;
847
+ }>>;
848
+ plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
849
+ id: z.ZodString;
850
+ text: z.ZodString;
851
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
852
+ }, "strip", z.ZodTypeAny, {
853
+ status: "pending" | "completed" | "in_progress";
854
+ id: string;
855
+ text: string;
856
+ }, {
857
+ status: "pending" | "completed" | "in_progress";
858
+ id: string;
859
+ text: string;
860
+ }>, "many">>;
861
+ status: z.ZodOptional<z.ZodEnum<["idle", "running", "waiting_permission", "error"]>>;
862
+ error: z.ZodOptional<z.ZodString>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ kind: "error" | "message" | "status" | "message_delta" | "tool_call" | "tool_result" | "plan";
865
+ error?: string | undefined;
866
+ message?: {
867
+ id: string;
868
+ role: "user" | "assistant" | "system";
869
+ content: string;
870
+ createdAt: number;
871
+ isStreaming?: boolean | undefined;
872
+ } | undefined;
873
+ status?: "error" | "running" | "idle" | "waiting_permission" | undefined;
874
+ agentSessionId?: string | undefined;
875
+ plan?: {
876
+ status: "pending" | "completed" | "in_progress";
877
+ id: string;
878
+ text: string;
879
+ }[] | undefined;
880
+ delta?: string | undefined;
881
+ toolCall?: {
882
+ status: "running" | "pending" | "completed" | "failed";
883
+ id: string;
884
+ name: string;
885
+ input?: string | undefined;
886
+ output?: string | undefined;
887
+ } | undefined;
888
+ }, {
889
+ kind: "error" | "message" | "status" | "message_delta" | "tool_call" | "tool_result" | "plan";
890
+ error?: string | undefined;
891
+ message?: {
892
+ id: string;
893
+ role: "user" | "assistant" | "system";
894
+ content: string;
895
+ createdAt: number;
896
+ isStreaming?: boolean | undefined;
897
+ } | undefined;
898
+ status?: "error" | "running" | "idle" | "waiting_permission" | undefined;
899
+ agentSessionId?: string | undefined;
900
+ plan?: {
901
+ status: "pending" | "completed" | "in_progress";
902
+ id: string;
903
+ text: string;
904
+ }[] | undefined;
905
+ delta?: string | undefined;
906
+ toolCall?: {
907
+ id: string;
908
+ name: string;
909
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
910
+ input?: string | undefined;
911
+ output?: string | undefined;
912
+ } | undefined;
913
+ }>;
914
+ export declare const agentPermissionRequestPayloadSchema: z.ZodObject<{
915
+ requestId: z.ZodString;
916
+ toolName: z.ZodOptional<z.ZodString>;
917
+ toolInput: z.ZodOptional<z.ZodString>;
918
+ context: z.ZodOptional<z.ZodString>;
919
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
920
+ id: z.ZodString;
921
+ label: z.ZodString;
922
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
923
+ }, "strip", z.ZodTypeAny, {
924
+ id: string;
925
+ kind: "allow" | "deny" | "other";
926
+ label: string;
927
+ }, {
928
+ id: string;
929
+ label: string;
930
+ kind?: "allow" | "deny" | "other" | undefined;
931
+ }>, "many">>;
932
+ } & {
933
+ agentSessionId: z.ZodOptional<z.ZodString>;
934
+ }, "strip", z.ZodTypeAny, {
935
+ options: {
936
+ id: string;
937
+ kind: "allow" | "deny" | "other";
938
+ label: string;
939
+ }[];
940
+ requestId: string;
941
+ toolName?: string | undefined;
942
+ toolInput?: string | undefined;
943
+ agentSessionId?: string | undefined;
944
+ context?: string | undefined;
945
+ }, {
946
+ requestId: string;
947
+ options?: {
948
+ id: string;
949
+ label: string;
950
+ kind?: "allow" | "deny" | "other" | undefined;
951
+ }[] | undefined;
952
+ toolName?: string | undefined;
953
+ toolInput?: string | undefined;
954
+ agentSessionId?: string | undefined;
955
+ context?: string | undefined;
956
+ }>;
957
+ export declare const agentPermissionResponsePayloadSchema: z.ZodObject<{
958
+ agentSessionId: z.ZodOptional<z.ZodString>;
959
+ requestId: z.ZodString;
960
+ outcome: z.ZodEnum<["allow", "deny", "cancelled"]>;
961
+ optionId: z.ZodOptional<z.ZodString>;
962
+ }, "strip", z.ZodTypeAny, {
963
+ requestId: string;
964
+ outcome: "allow" | "deny" | "cancelled";
965
+ agentSessionId?: string | undefined;
966
+ optionId?: string | undefined;
967
+ }, {
968
+ requestId: string;
969
+ outcome: "allow" | "deny" | "cancelled";
970
+ agentSessionId?: string | undefined;
971
+ optionId?: string | undefined;
972
+ }>;
973
+ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
974
+ agentSessionId: z.ZodOptional<z.ZodString>;
975
+ capabilities: z.ZodOptional<z.ZodObject<{
976
+ enabled: z.ZodBoolean;
977
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
978
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
979
+ error: z.ZodOptional<z.ZodString>;
980
+ supportsSessionList: z.ZodDefault<z.ZodBoolean>;
981
+ supportsSessionLoad: z.ZodDefault<z.ZodBoolean>;
982
+ supportsImages: z.ZodDefault<z.ZodBoolean>;
983
+ supportsAudio: z.ZodDefault<z.ZodBoolean>;
984
+ supportsPermission: z.ZodDefault<z.ZodBoolean>;
985
+ supportsPlan: z.ZodDefault<z.ZodBoolean>;
986
+ supportsCancel: z.ZodDefault<z.ZodBoolean>;
987
+ }, "strip", z.ZodTypeAny, {
988
+ enabled: boolean;
989
+ supportsSessionList: boolean;
990
+ supportsSessionLoad: boolean;
991
+ supportsImages: boolean;
992
+ supportsAudio: boolean;
993
+ supportsPermission: boolean;
994
+ supportsPlan: boolean;
995
+ supportsCancel: boolean;
996
+ error?: string | undefined;
997
+ provider?: "claude" | "codex" | "custom" | undefined;
998
+ protocolVersion?: number | undefined;
999
+ }, {
1000
+ enabled: boolean;
1001
+ error?: string | undefined;
1002
+ provider?: "claude" | "codex" | "custom" | undefined;
1003
+ protocolVersion?: number | undefined;
1004
+ supportsSessionList?: boolean | undefined;
1005
+ supportsSessionLoad?: boolean | undefined;
1006
+ supportsImages?: boolean | undefined;
1007
+ supportsAudio?: boolean | undefined;
1008
+ supportsPermission?: boolean | undefined;
1009
+ supportsPlan?: boolean | undefined;
1010
+ supportsCancel?: boolean | undefined;
1011
+ }>>;
1012
+ messages: z.ZodDefault<z.ZodArray<z.ZodObject<{
1013
+ id: z.ZodString;
1014
+ role: z.ZodEnum<["user", "assistant", "system"]>;
1015
+ content: z.ZodString;
1016
+ createdAt: z.ZodNumber;
1017
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
1018
+ }, "strip", z.ZodTypeAny, {
1019
+ id: string;
1020
+ role: "user" | "assistant" | "system";
1021
+ content: string;
1022
+ createdAt: number;
1023
+ isStreaming?: boolean | undefined;
1024
+ }, {
1025
+ id: string;
1026
+ role: "user" | "assistant" | "system";
1027
+ content: string;
1028
+ createdAt: number;
1029
+ isStreaming?: boolean | undefined;
1030
+ }>, "many">>;
1031
+ toolCalls: z.ZodDefault<z.ZodArray<z.ZodObject<{
1032
+ id: z.ZodString;
1033
+ name: z.ZodString;
1034
+ input: z.ZodOptional<z.ZodString>;
1035
+ output: z.ZodOptional<z.ZodString>;
1036
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ status: "running" | "pending" | "completed" | "failed";
1039
+ id: string;
1040
+ name: string;
1041
+ input?: string | undefined;
1042
+ output?: string | undefined;
1043
+ }, {
1044
+ id: string;
1045
+ name: string;
1046
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
1047
+ input?: string | undefined;
1048
+ output?: string | undefined;
1049
+ }>, "many">>;
1050
+ pendingPermissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1051
+ requestId: z.ZodString;
1052
+ toolName: z.ZodOptional<z.ZodString>;
1053
+ toolInput: z.ZodOptional<z.ZodString>;
1054
+ context: z.ZodOptional<z.ZodString>;
1055
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
1056
+ id: z.ZodString;
1057
+ label: z.ZodString;
1058
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ id: string;
1061
+ kind: "allow" | "deny" | "other";
1062
+ label: string;
1063
+ }, {
1064
+ id: string;
1065
+ label: string;
1066
+ kind?: "allow" | "deny" | "other" | undefined;
1067
+ }>, "many">>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ options: {
1070
+ id: string;
1071
+ kind: "allow" | "deny" | "other";
1072
+ label: string;
1073
+ }[];
1074
+ requestId: string;
1075
+ toolName?: string | undefined;
1076
+ toolInput?: string | undefined;
1077
+ context?: string | undefined;
1078
+ }, {
1079
+ requestId: string;
1080
+ options?: {
1081
+ id: string;
1082
+ label: string;
1083
+ kind?: "allow" | "deny" | "other" | undefined;
1084
+ }[] | undefined;
1085
+ toolName?: string | undefined;
1086
+ toolInput?: string | undefined;
1087
+ context?: string | undefined;
1088
+ }>, "many">>;
1089
+ status: z.ZodDefault<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
1090
+ error: z.ZodOptional<z.ZodString>;
1091
+ }, "strip", z.ZodTypeAny, {
1092
+ status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
1093
+ messages: {
1094
+ id: string;
1095
+ role: "user" | "assistant" | "system";
1096
+ content: string;
1097
+ createdAt: number;
1098
+ isStreaming?: boolean | undefined;
1099
+ }[];
1100
+ toolCalls: {
1101
+ status: "running" | "pending" | "completed" | "failed";
1102
+ id: string;
1103
+ name: string;
1104
+ input?: string | undefined;
1105
+ output?: string | undefined;
1106
+ }[];
1107
+ pendingPermissions: {
1108
+ options: {
1109
+ id: string;
1110
+ kind: "allow" | "deny" | "other";
1111
+ label: string;
1112
+ }[];
1113
+ requestId: string;
1114
+ toolName?: string | undefined;
1115
+ toolInput?: string | undefined;
1116
+ context?: string | undefined;
1117
+ }[];
1118
+ error?: string | undefined;
1119
+ agentSessionId?: string | undefined;
1120
+ capabilities?: {
1121
+ enabled: boolean;
1122
+ supportsSessionList: boolean;
1123
+ supportsSessionLoad: boolean;
1124
+ supportsImages: boolean;
1125
+ supportsAudio: boolean;
1126
+ supportsPermission: boolean;
1127
+ supportsPlan: boolean;
1128
+ supportsCancel: boolean;
1129
+ error?: string | undefined;
1130
+ provider?: "claude" | "codex" | "custom" | undefined;
1131
+ protocolVersion?: number | undefined;
1132
+ } | undefined;
1133
+ }, {
1134
+ error?: string | undefined;
1135
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
1136
+ agentSessionId?: string | undefined;
1137
+ capabilities?: {
1138
+ enabled: boolean;
1139
+ error?: string | undefined;
1140
+ provider?: "claude" | "codex" | "custom" | undefined;
1141
+ protocolVersion?: number | undefined;
1142
+ supportsSessionList?: boolean | undefined;
1143
+ supportsSessionLoad?: boolean | undefined;
1144
+ supportsImages?: boolean | undefined;
1145
+ supportsAudio?: boolean | undefined;
1146
+ supportsPermission?: boolean | undefined;
1147
+ supportsPlan?: boolean | undefined;
1148
+ supportsCancel?: boolean | undefined;
1149
+ } | undefined;
1150
+ messages?: {
1151
+ id: string;
1152
+ role: "user" | "assistant" | "system";
1153
+ content: string;
1154
+ createdAt: number;
1155
+ isStreaming?: boolean | undefined;
1156
+ }[] | undefined;
1157
+ toolCalls?: {
1158
+ id: string;
1159
+ name: string;
1160
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
1161
+ input?: string | undefined;
1162
+ output?: string | undefined;
1163
+ }[] | undefined;
1164
+ pendingPermissions?: {
1165
+ requestId: string;
1166
+ options?: {
1167
+ id: string;
1168
+ label: string;
1169
+ kind?: "allow" | "deny" | "other" | undefined;
1170
+ }[] | undefined;
1171
+ toolName?: string | undefined;
1172
+ toolInput?: string | undefined;
1173
+ context?: string | undefined;
1174
+ }[] | undefined;
1175
+ }>;
605
1176
  export declare const protocolMessageSchemas: {
606
1177
  readonly "session.connect": z.ZodObject<{
607
1178
  role: z.ZodEnum<["host", "client"]>;
@@ -1132,6 +1703,483 @@ export declare const protocolMessageSchemas: {
1132
1703
  entries: string[];
1133
1704
  shell?: string | undefined;
1134
1705
  }>;
1706
+ readonly "agent.initialize": z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1707
+ readonly "agent.capabilities": z.ZodObject<{
1708
+ enabled: z.ZodBoolean;
1709
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
1710
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
1711
+ error: z.ZodOptional<z.ZodString>;
1712
+ supportsSessionList: z.ZodDefault<z.ZodBoolean>;
1713
+ supportsSessionLoad: z.ZodDefault<z.ZodBoolean>;
1714
+ supportsImages: z.ZodDefault<z.ZodBoolean>;
1715
+ supportsAudio: z.ZodDefault<z.ZodBoolean>;
1716
+ supportsPermission: z.ZodDefault<z.ZodBoolean>;
1717
+ supportsPlan: z.ZodDefault<z.ZodBoolean>;
1718
+ supportsCancel: z.ZodDefault<z.ZodBoolean>;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ enabled: boolean;
1721
+ supportsSessionList: boolean;
1722
+ supportsSessionLoad: boolean;
1723
+ supportsImages: boolean;
1724
+ supportsAudio: boolean;
1725
+ supportsPermission: boolean;
1726
+ supportsPlan: boolean;
1727
+ supportsCancel: boolean;
1728
+ error?: string | undefined;
1729
+ provider?: "claude" | "codex" | "custom" | undefined;
1730
+ protocolVersion?: number | undefined;
1731
+ }, {
1732
+ enabled: boolean;
1733
+ error?: string | undefined;
1734
+ provider?: "claude" | "codex" | "custom" | undefined;
1735
+ protocolVersion?: number | undefined;
1736
+ supportsSessionList?: boolean | undefined;
1737
+ supportsSessionLoad?: boolean | undefined;
1738
+ supportsImages?: boolean | undefined;
1739
+ supportsAudio?: boolean | undefined;
1740
+ supportsPermission?: boolean | undefined;
1741
+ supportsPlan?: boolean | undefined;
1742
+ supportsCancel?: boolean | undefined;
1743
+ }>;
1744
+ readonly "agent.session.new": z.ZodObject<{
1745
+ cwd: z.ZodOptional<z.ZodString>;
1746
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
1747
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1748
+ }, "strip", z.ZodTypeAny, {
1749
+ provider?: "claude" | "codex" | "custom" | undefined;
1750
+ cwd?: string | undefined;
1751
+ mcpServers?: Record<string, unknown> | undefined;
1752
+ }, {
1753
+ provider?: "claude" | "codex" | "custom" | undefined;
1754
+ cwd?: string | undefined;
1755
+ mcpServers?: Record<string, unknown> | undefined;
1756
+ }>;
1757
+ readonly "agent.session.load": z.ZodObject<{
1758
+ agentSessionId: z.ZodString;
1759
+ cwd: z.ZodOptional<z.ZodString>;
1760
+ }, "strip", z.ZodTypeAny, {
1761
+ agentSessionId: string;
1762
+ cwd?: string | undefined;
1763
+ }, {
1764
+ agentSessionId: string;
1765
+ cwd?: string | undefined;
1766
+ }>;
1767
+ readonly "agent.session.list": z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1768
+ readonly "agent.prompt": z.ZodObject<{
1769
+ agentSessionId: z.ZodOptional<z.ZodString>;
1770
+ clientMessageId: z.ZodString;
1771
+ contentBlocks: z.ZodArray<z.ZodObject<{
1772
+ type: z.ZodEnum<["text", "image"]>;
1773
+ text: z.ZodOptional<z.ZodString>;
1774
+ data: z.ZodOptional<z.ZodString>;
1775
+ mimeType: z.ZodOptional<z.ZodString>;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ type: "text" | "image";
1778
+ data?: string | undefined;
1779
+ text?: string | undefined;
1780
+ mimeType?: string | undefined;
1781
+ }, {
1782
+ type: "text" | "image";
1783
+ data?: string | undefined;
1784
+ text?: string | undefined;
1785
+ mimeType?: string | undefined;
1786
+ }>, "many">;
1787
+ }, "strip", z.ZodTypeAny, {
1788
+ clientMessageId: string;
1789
+ contentBlocks: {
1790
+ type: "text" | "image";
1791
+ data?: string | undefined;
1792
+ text?: string | undefined;
1793
+ mimeType?: string | undefined;
1794
+ }[];
1795
+ agentSessionId?: string | undefined;
1796
+ }, {
1797
+ clientMessageId: string;
1798
+ contentBlocks: {
1799
+ type: "text" | "image";
1800
+ data?: string | undefined;
1801
+ text?: string | undefined;
1802
+ mimeType?: string | undefined;
1803
+ }[];
1804
+ agentSessionId?: string | undefined;
1805
+ }>;
1806
+ readonly "agent.cancel": z.ZodObject<{
1807
+ agentSessionId: z.ZodOptional<z.ZodString>;
1808
+ }, "strip", z.ZodTypeAny, {
1809
+ agentSessionId?: string | undefined;
1810
+ }, {
1811
+ agentSessionId?: string | undefined;
1812
+ }>;
1813
+ readonly "agent.update": z.ZodObject<{
1814
+ agentSessionId: z.ZodOptional<z.ZodString>;
1815
+ kind: z.ZodEnum<["message", "message_delta", "tool_call", "tool_result", "plan", "status", "error"]>;
1816
+ message: z.ZodOptional<z.ZodObject<{
1817
+ id: z.ZodString;
1818
+ role: z.ZodEnum<["user", "assistant", "system"]>;
1819
+ content: z.ZodString;
1820
+ createdAt: z.ZodNumber;
1821
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
1822
+ }, "strip", z.ZodTypeAny, {
1823
+ id: string;
1824
+ role: "user" | "assistant" | "system";
1825
+ content: string;
1826
+ createdAt: number;
1827
+ isStreaming?: boolean | undefined;
1828
+ }, {
1829
+ id: string;
1830
+ role: "user" | "assistant" | "system";
1831
+ content: string;
1832
+ createdAt: number;
1833
+ isStreaming?: boolean | undefined;
1834
+ }>>;
1835
+ delta: z.ZodOptional<z.ZodString>;
1836
+ toolCall: z.ZodOptional<z.ZodObject<{
1837
+ id: z.ZodString;
1838
+ name: z.ZodString;
1839
+ input: z.ZodOptional<z.ZodString>;
1840
+ output: z.ZodOptional<z.ZodString>;
1841
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
1842
+ }, "strip", z.ZodTypeAny, {
1843
+ status: "running" | "pending" | "completed" | "failed";
1844
+ id: string;
1845
+ name: string;
1846
+ input?: string | undefined;
1847
+ output?: string | undefined;
1848
+ }, {
1849
+ id: string;
1850
+ name: string;
1851
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
1852
+ input?: string | undefined;
1853
+ output?: string | undefined;
1854
+ }>>;
1855
+ plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
1856
+ id: z.ZodString;
1857
+ text: z.ZodString;
1858
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1859
+ }, "strip", z.ZodTypeAny, {
1860
+ status: "pending" | "completed" | "in_progress";
1861
+ id: string;
1862
+ text: string;
1863
+ }, {
1864
+ status: "pending" | "completed" | "in_progress";
1865
+ id: string;
1866
+ text: string;
1867
+ }>, "many">>;
1868
+ status: z.ZodOptional<z.ZodEnum<["idle", "running", "waiting_permission", "error"]>>;
1869
+ error: z.ZodOptional<z.ZodString>;
1870
+ }, "strip", z.ZodTypeAny, {
1871
+ kind: "error" | "message" | "status" | "message_delta" | "tool_call" | "tool_result" | "plan";
1872
+ error?: string | undefined;
1873
+ message?: {
1874
+ id: string;
1875
+ role: "user" | "assistant" | "system";
1876
+ content: string;
1877
+ createdAt: number;
1878
+ isStreaming?: boolean | undefined;
1879
+ } | undefined;
1880
+ status?: "error" | "running" | "idle" | "waiting_permission" | undefined;
1881
+ agentSessionId?: string | undefined;
1882
+ plan?: {
1883
+ status: "pending" | "completed" | "in_progress";
1884
+ id: string;
1885
+ text: string;
1886
+ }[] | undefined;
1887
+ delta?: string | undefined;
1888
+ toolCall?: {
1889
+ status: "running" | "pending" | "completed" | "failed";
1890
+ id: string;
1891
+ name: string;
1892
+ input?: string | undefined;
1893
+ output?: string | undefined;
1894
+ } | undefined;
1895
+ }, {
1896
+ kind: "error" | "message" | "status" | "message_delta" | "tool_call" | "tool_result" | "plan";
1897
+ error?: string | undefined;
1898
+ message?: {
1899
+ id: string;
1900
+ role: "user" | "assistant" | "system";
1901
+ content: string;
1902
+ createdAt: number;
1903
+ isStreaming?: boolean | undefined;
1904
+ } | undefined;
1905
+ status?: "error" | "running" | "idle" | "waiting_permission" | undefined;
1906
+ agentSessionId?: string | undefined;
1907
+ plan?: {
1908
+ status: "pending" | "completed" | "in_progress";
1909
+ id: string;
1910
+ text: string;
1911
+ }[] | undefined;
1912
+ delta?: string | undefined;
1913
+ toolCall?: {
1914
+ id: string;
1915
+ name: string;
1916
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
1917
+ input?: string | undefined;
1918
+ output?: string | undefined;
1919
+ } | undefined;
1920
+ }>;
1921
+ readonly "agent.permission.request": z.ZodObject<{
1922
+ requestId: z.ZodString;
1923
+ toolName: z.ZodOptional<z.ZodString>;
1924
+ toolInput: z.ZodOptional<z.ZodString>;
1925
+ context: z.ZodOptional<z.ZodString>;
1926
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
1927
+ id: z.ZodString;
1928
+ label: z.ZodString;
1929
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
1930
+ }, "strip", z.ZodTypeAny, {
1931
+ id: string;
1932
+ kind: "allow" | "deny" | "other";
1933
+ label: string;
1934
+ }, {
1935
+ id: string;
1936
+ label: string;
1937
+ kind?: "allow" | "deny" | "other" | undefined;
1938
+ }>, "many">>;
1939
+ } & {
1940
+ agentSessionId: z.ZodOptional<z.ZodString>;
1941
+ }, "strip", z.ZodTypeAny, {
1942
+ options: {
1943
+ id: string;
1944
+ kind: "allow" | "deny" | "other";
1945
+ label: string;
1946
+ }[];
1947
+ requestId: string;
1948
+ toolName?: string | undefined;
1949
+ toolInput?: string | undefined;
1950
+ agentSessionId?: string | undefined;
1951
+ context?: string | undefined;
1952
+ }, {
1953
+ requestId: string;
1954
+ options?: {
1955
+ id: string;
1956
+ label: string;
1957
+ kind?: "allow" | "deny" | "other" | undefined;
1958
+ }[] | undefined;
1959
+ toolName?: string | undefined;
1960
+ toolInput?: string | undefined;
1961
+ agentSessionId?: string | undefined;
1962
+ context?: string | undefined;
1963
+ }>;
1964
+ readonly "agent.permission.response": z.ZodObject<{
1965
+ agentSessionId: z.ZodOptional<z.ZodString>;
1966
+ requestId: z.ZodString;
1967
+ outcome: z.ZodEnum<["allow", "deny", "cancelled"]>;
1968
+ optionId: z.ZodOptional<z.ZodString>;
1969
+ }, "strip", z.ZodTypeAny, {
1970
+ requestId: string;
1971
+ outcome: "allow" | "deny" | "cancelled";
1972
+ agentSessionId?: string | undefined;
1973
+ optionId?: string | undefined;
1974
+ }, {
1975
+ requestId: string;
1976
+ outcome: "allow" | "deny" | "cancelled";
1977
+ agentSessionId?: string | undefined;
1978
+ optionId?: string | undefined;
1979
+ }>;
1980
+ readonly "agent.snapshot": z.ZodObject<{
1981
+ agentSessionId: z.ZodOptional<z.ZodString>;
1982
+ capabilities: z.ZodOptional<z.ZodObject<{
1983
+ enabled: z.ZodBoolean;
1984
+ provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
1985
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
1986
+ error: z.ZodOptional<z.ZodString>;
1987
+ supportsSessionList: z.ZodDefault<z.ZodBoolean>;
1988
+ supportsSessionLoad: z.ZodDefault<z.ZodBoolean>;
1989
+ supportsImages: z.ZodDefault<z.ZodBoolean>;
1990
+ supportsAudio: z.ZodDefault<z.ZodBoolean>;
1991
+ supportsPermission: z.ZodDefault<z.ZodBoolean>;
1992
+ supportsPlan: z.ZodDefault<z.ZodBoolean>;
1993
+ supportsCancel: z.ZodDefault<z.ZodBoolean>;
1994
+ }, "strip", z.ZodTypeAny, {
1995
+ enabled: boolean;
1996
+ supportsSessionList: boolean;
1997
+ supportsSessionLoad: boolean;
1998
+ supportsImages: boolean;
1999
+ supportsAudio: boolean;
2000
+ supportsPermission: boolean;
2001
+ supportsPlan: boolean;
2002
+ supportsCancel: boolean;
2003
+ error?: string | undefined;
2004
+ provider?: "claude" | "codex" | "custom" | undefined;
2005
+ protocolVersion?: number | undefined;
2006
+ }, {
2007
+ enabled: boolean;
2008
+ error?: string | undefined;
2009
+ provider?: "claude" | "codex" | "custom" | undefined;
2010
+ protocolVersion?: number | undefined;
2011
+ supportsSessionList?: boolean | undefined;
2012
+ supportsSessionLoad?: boolean | undefined;
2013
+ supportsImages?: boolean | undefined;
2014
+ supportsAudio?: boolean | undefined;
2015
+ supportsPermission?: boolean | undefined;
2016
+ supportsPlan?: boolean | undefined;
2017
+ supportsCancel?: boolean | undefined;
2018
+ }>>;
2019
+ messages: z.ZodDefault<z.ZodArray<z.ZodObject<{
2020
+ id: z.ZodString;
2021
+ role: z.ZodEnum<["user", "assistant", "system"]>;
2022
+ content: z.ZodString;
2023
+ createdAt: z.ZodNumber;
2024
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
2025
+ }, "strip", z.ZodTypeAny, {
2026
+ id: string;
2027
+ role: "user" | "assistant" | "system";
2028
+ content: string;
2029
+ createdAt: number;
2030
+ isStreaming?: boolean | undefined;
2031
+ }, {
2032
+ id: string;
2033
+ role: "user" | "assistant" | "system";
2034
+ content: string;
2035
+ createdAt: number;
2036
+ isStreaming?: boolean | undefined;
2037
+ }>, "many">>;
2038
+ toolCalls: z.ZodDefault<z.ZodArray<z.ZodObject<{
2039
+ id: z.ZodString;
2040
+ name: z.ZodString;
2041
+ input: z.ZodOptional<z.ZodString>;
2042
+ output: z.ZodOptional<z.ZodString>;
2043
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
2044
+ }, "strip", z.ZodTypeAny, {
2045
+ status: "running" | "pending" | "completed" | "failed";
2046
+ id: string;
2047
+ name: string;
2048
+ input?: string | undefined;
2049
+ output?: string | undefined;
2050
+ }, {
2051
+ id: string;
2052
+ name: string;
2053
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
2054
+ input?: string | undefined;
2055
+ output?: string | undefined;
2056
+ }>, "many">>;
2057
+ pendingPermissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
2058
+ requestId: z.ZodString;
2059
+ toolName: z.ZodOptional<z.ZodString>;
2060
+ toolInput: z.ZodOptional<z.ZodString>;
2061
+ context: z.ZodOptional<z.ZodString>;
2062
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
2063
+ id: z.ZodString;
2064
+ label: z.ZodString;
2065
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ id: string;
2068
+ kind: "allow" | "deny" | "other";
2069
+ label: string;
2070
+ }, {
2071
+ id: string;
2072
+ label: string;
2073
+ kind?: "allow" | "deny" | "other" | undefined;
2074
+ }>, "many">>;
2075
+ }, "strip", z.ZodTypeAny, {
2076
+ options: {
2077
+ id: string;
2078
+ kind: "allow" | "deny" | "other";
2079
+ label: string;
2080
+ }[];
2081
+ requestId: string;
2082
+ toolName?: string | undefined;
2083
+ toolInput?: string | undefined;
2084
+ context?: string | undefined;
2085
+ }, {
2086
+ requestId: string;
2087
+ options?: {
2088
+ id: string;
2089
+ label: string;
2090
+ kind?: "allow" | "deny" | "other" | undefined;
2091
+ }[] | undefined;
2092
+ toolName?: string | undefined;
2093
+ toolInput?: string | undefined;
2094
+ context?: string | undefined;
2095
+ }>, "many">>;
2096
+ status: z.ZodDefault<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
2097
+ error: z.ZodOptional<z.ZodString>;
2098
+ }, "strip", z.ZodTypeAny, {
2099
+ status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
2100
+ messages: {
2101
+ id: string;
2102
+ role: "user" | "assistant" | "system";
2103
+ content: string;
2104
+ createdAt: number;
2105
+ isStreaming?: boolean | undefined;
2106
+ }[];
2107
+ toolCalls: {
2108
+ status: "running" | "pending" | "completed" | "failed";
2109
+ id: string;
2110
+ name: string;
2111
+ input?: string | undefined;
2112
+ output?: string | undefined;
2113
+ }[];
2114
+ pendingPermissions: {
2115
+ options: {
2116
+ id: string;
2117
+ kind: "allow" | "deny" | "other";
2118
+ label: string;
2119
+ }[];
2120
+ requestId: string;
2121
+ toolName?: string | undefined;
2122
+ toolInput?: string | undefined;
2123
+ context?: string | undefined;
2124
+ }[];
2125
+ error?: string | undefined;
2126
+ agentSessionId?: string | undefined;
2127
+ capabilities?: {
2128
+ enabled: boolean;
2129
+ supportsSessionList: boolean;
2130
+ supportsSessionLoad: boolean;
2131
+ supportsImages: boolean;
2132
+ supportsAudio: boolean;
2133
+ supportsPermission: boolean;
2134
+ supportsPlan: boolean;
2135
+ supportsCancel: boolean;
2136
+ error?: string | undefined;
2137
+ provider?: "claude" | "codex" | "custom" | undefined;
2138
+ protocolVersion?: number | undefined;
2139
+ } | undefined;
2140
+ }, {
2141
+ error?: string | undefined;
2142
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
2143
+ agentSessionId?: string | undefined;
2144
+ capabilities?: {
2145
+ enabled: boolean;
2146
+ error?: string | undefined;
2147
+ provider?: "claude" | "codex" | "custom" | undefined;
2148
+ protocolVersion?: number | undefined;
2149
+ supportsSessionList?: boolean | undefined;
2150
+ supportsSessionLoad?: boolean | undefined;
2151
+ supportsImages?: boolean | undefined;
2152
+ supportsAudio?: boolean | undefined;
2153
+ supportsPermission?: boolean | undefined;
2154
+ supportsPlan?: boolean | undefined;
2155
+ supportsCancel?: boolean | undefined;
2156
+ } | undefined;
2157
+ messages?: {
2158
+ id: string;
2159
+ role: "user" | "assistant" | "system";
2160
+ content: string;
2161
+ createdAt: number;
2162
+ isStreaming?: boolean | undefined;
2163
+ }[] | undefined;
2164
+ toolCalls?: {
2165
+ id: string;
2166
+ name: string;
2167
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
2168
+ input?: string | undefined;
2169
+ output?: string | undefined;
2170
+ }[] | undefined;
2171
+ pendingPermissions?: {
2172
+ requestId: string;
2173
+ options?: {
2174
+ id: string;
2175
+ label: string;
2176
+ kind?: "allow" | "deny" | "other" | undefined;
2177
+ }[] | undefined;
2178
+ toolName?: string | undefined;
2179
+ toolInput?: string | undefined;
2180
+ context?: string | undefined;
2181
+ }[] | undefined;
2182
+ }>;
1135
2183
  };
1136
2184
  export type ProtocolMessageType = keyof typeof protocolMessageSchemas;
1137
2185
  export declare function createEnvelope<T>(input: {