@wippy-fe/types-global-proxy 0.0.58 → 0.0.59

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.
Files changed (2) hide show
  1. package/index.d.ts +26 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -845,6 +845,15 @@ interface Artifact {
845
845
  status: ArtifactStatus;
846
846
  }
847
847
 
848
+ interface SessionInteraction {
849
+ can_send: boolean;
850
+ revision: number;
851
+ }
852
+ interface SessionInput {
853
+ state: 'pending' | 'applied';
854
+ after_message_id?: string;
855
+ }
856
+
848
857
  type ArtifactUUID = string;
849
858
  type PageUUID = string;
850
859
  type SessionUUID = string;
@@ -922,6 +931,8 @@ interface WsTopicTypes {
922
931
  }
923
932
  type WsTopic = WsTopicTypes[keyof WsTopicTypes];
924
933
  declare enum WsMessageType {
934
+ /** Patch an existing message or session. */
935
+ UPDATE = "update",
925
936
  /** Contains the actual content of the message */
926
937
  CONTENT = "content",
927
938
  /** Contains content of the message to append to current one */
@@ -1038,6 +1049,12 @@ interface WsMessageDataUser extends WsMessageDataBase {
1038
1049
  text: string;
1039
1050
  message_id: MessageUUID;
1040
1051
  file_uuids?: string[];
1052
+ input?: SessionInput;
1053
+ }
1054
+ interface WsMessageDataUpdate extends WsMessageDataBase {
1055
+ type: WsMessageType.UPDATE;
1056
+ message_id: MessageUUID;
1057
+ input: SessionInput;
1041
1058
  }
1042
1059
  interface WsMessageDataDelegation extends WsMessageDataBase {
1043
1060
  type: WsMessageType.DELEGATION;
@@ -1077,7 +1094,7 @@ interface WsMessageDataError extends WsMessageDataBase {
1077
1094
  }
1078
1095
  interface WsMessage_SessionMessage extends WsMessageBase {
1079
1096
  topic: WsTopicTypes['SessionMessage'];
1080
- data: (WsMessageDataUser | WsMessageDataContent | WsMessageDataChunk | WsMessageDataDelegation | WsMessageDataToolCall | WsMessageDataError | WsMessageDataInvalidate | WsMessageDataStarted | WsMessageDataToolSuccess | WsMessageDataArtifact | WsMessageDataToolError) & {
1097
+ data: (WsMessageDataUser | WsMessageDataContent | WsMessageDataChunk | WsMessageDataDelegation | WsMessageDataToolCall | WsMessageDataError | WsMessageDataInvalidate | WsMessageDataStarted | WsMessageDataToolSuccess | WsMessageDataArtifact | WsMessageDataToolError | WsMessageDataUpdate) & {
1081
1098
  request_id?: string;
1082
1099
  };
1083
1100
  }
@@ -1085,19 +1102,24 @@ interface WsMessage_Session extends WsMessageBase {
1085
1102
  topic: WsTopicTypes['Session'];
1086
1103
  data: {
1087
1104
  request_id?: string;
1105
+ session_id?: SessionUUID;
1088
1106
  agent?: string;
1089
1107
  last_message_date?: number;
1090
1108
  model?: string;
1091
1109
  status?: string;
1092
1110
  title?: string;
1093
1111
  type: 'update';
1112
+ interaction?: SessionInteraction;
1094
1113
  public_meta?: Array<{
1095
1114
  icon?: string;
1096
1115
  id: string;
1097
1116
  title: string;
1098
1117
  url?: string;
1099
1118
  }>;
1100
- };
1119
+ } | (WsMessageDataError & {
1120
+ request_id?: string;
1121
+ session_id?: SessionUUID;
1122
+ });
1101
1123
  }
1102
1124
  interface WsMessage_Artifact extends WsMessageBase {
1103
1125
  topic: WsTopicTypes['Artifact'];
@@ -1132,7 +1154,8 @@ interface SessionCloseCommand extends BaseWsCommand {
1132
1154
  interface SessionMessageCommand extends BaseWsCommand {
1133
1155
  type: 'session_message';
1134
1156
  session_id: string;
1135
- message_id: string;
1157
+ /** Legacy fire-and-forget servers require this client-generated ID. */
1158
+ message_id?: string;
1136
1159
  data: {
1137
1160
  text: string;
1138
1161
  file_uuids?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/types-global-proxy",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "Global type declarations for Wippy iframe proxy (window.getWippyApi, $W, etc.)",
5
5
  "license": "UNLICENSED",
6
6
  "types": "index.d.ts",