@inline-openclaw/inline 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/approval-handler.runtime.js +1127 -68
- package/dist/approval-handler.runtime.js.map +8 -8
- package/dist/channel-plugin-api.js +1788 -504
- package/dist/channel-plugin-api.js.map +12 -12
- package/dist/runtime-register-api.js +1118 -65
- package/dist/runtime-register-api.js.map +7 -7
- package/package.json +2 -2
|
@@ -5834,6 +5834,20 @@ var UploadFailure_Code;
|
|
|
5834
5834
|
UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_PROCESSING"] = 3] = "UPLOAD_FAILURE_PROCESSING";
|
|
5835
5835
|
UploadFailure_Code2[UploadFailure_Code2["UPLOAD_FAILURE_STORAGE"] = 4] = "UPLOAD_FAILURE_STORAGE";
|
|
5836
5836
|
})(UploadFailure_Code || (UploadFailure_Code = {}));
|
|
5837
|
+
var RequestBotFilesystemInput_Operation;
|
|
5838
|
+
(function(RequestBotFilesystemInput_Operation2) {
|
|
5839
|
+
RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["OPERATION_UNSPECIFIED"] = 0] = "OPERATION_UNSPECIFIED";
|
|
5840
|
+
RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["LIST"] = 1] = "LIST";
|
|
5841
|
+
RequestBotFilesystemInput_Operation2[RequestBotFilesystemInput_Operation2["REGISTER_FOLDER"] = 2] = "REGISTER_FOLDER";
|
|
5842
|
+
})(RequestBotFilesystemInput_Operation || (RequestBotFilesystemInput_Operation = {}));
|
|
5843
|
+
var BotFilesystemEntry_Kind;
|
|
5844
|
+
(function(BotFilesystemEntry_Kind2) {
|
|
5845
|
+
BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["KIND_UNSPECIFIED"] = 0] = "KIND_UNSPECIFIED";
|
|
5846
|
+
BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["FILE"] = 1] = "FILE";
|
|
5847
|
+
BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["DIRECTORY"] = 2] = "DIRECTORY";
|
|
5848
|
+
BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["SYMLINK"] = 3] = "SYMLINK";
|
|
5849
|
+
BotFilesystemEntry_Kind2[BotFilesystemEntry_Kind2["OTHER"] = 4] = "OTHER";
|
|
5850
|
+
})(BotFilesystemEntry_Kind || (BotFilesystemEntry_Kind = {}));
|
|
5837
5851
|
var DialogFollowMode;
|
|
5838
5852
|
(function(DialogFollowMode2) {
|
|
5839
5853
|
DialogFollowMode2[DialogFollowMode2["DIALOG_FOLLOW_MODE_UNSPECIFIED"] = 0] = "DIALOG_FOLLOW_MODE_UNSPECIFIED";
|
|
@@ -6032,6 +6046,10 @@ var Method;
|
|
|
6032
6046
|
Method2[Method2["GET_USERS"] = 138] = "GET_USERS";
|
|
6033
6047
|
Method2[Method2["GET_BOT_SKILLS"] = 139] = "GET_BOT_SKILLS";
|
|
6034
6048
|
Method2[Method2["GET_BOT_CONFIGURATION_CATALOG"] = 140] = "GET_BOT_CONFIGURATION_CATALOG";
|
|
6049
|
+
Method2[Method2["UPDATE_DIALOG_TRANSLATION"] = 141] = "UPDATE_DIALOG_TRANSLATION";
|
|
6050
|
+
Method2[Method2["TRANSCRIBE_VOICE_DRAFT"] = 142] = "TRANSCRIBE_VOICE_DRAFT";
|
|
6051
|
+
Method2[Method2["REQUEST_BOT_FILESYSTEM"] = 143] = "REQUEST_BOT_FILESYSTEM";
|
|
6052
|
+
Method2[Method2["ANSWER_BOT_FILESYSTEM"] = 144] = "ANSWER_BOT_FILESYSTEM";
|
|
6035
6053
|
})(Method || (Method = {}));
|
|
6036
6054
|
var GridConnectionUnavailableReason;
|
|
6037
6055
|
(function(GridConnectionUnavailableReason2) {
|
|
@@ -6500,7 +6518,8 @@ class BotEvent$Type extends import_runtime4.MessageType {
|
|
|
6500
6518
|
constructor() {
|
|
6501
6519
|
super("BotEvent", [
|
|
6502
6520
|
{ no: 1, name: "chat_settings_requested", kind: "message", oneof: "event", T: () => BotChatSettingsRequested },
|
|
6503
|
-
{ no: 2, name: "chat_settings_item_invoked", kind: "message", oneof: "event", T: () => BotChatSettingsItemInvoked }
|
|
6521
|
+
{ no: 2, name: "chat_settings_item_invoked", kind: "message", oneof: "event", T: () => BotChatSettingsItemInvoked },
|
|
6522
|
+
{ no: 3, name: "filesystem_requested", kind: "message", oneof: "event", T: () => BotFilesystemRequested }
|
|
6504
6523
|
]);
|
|
6505
6524
|
}
|
|
6506
6525
|
create(value) {
|
|
@@ -6527,6 +6546,12 @@ class BotEvent$Type extends import_runtime4.MessageType {
|
|
|
6527
6546
|
chatSettingsItemInvoked: BotChatSettingsItemInvoked.internalBinaryRead(reader, reader.uint32(), options, message.event.chatSettingsItemInvoked)
|
|
6528
6547
|
};
|
|
6529
6548
|
break;
|
|
6549
|
+
case 3:
|
|
6550
|
+
message.event = {
|
|
6551
|
+
oneofKind: "filesystemRequested",
|
|
6552
|
+
filesystemRequested: BotFilesystemRequested.internalBinaryRead(reader, reader.uint32(), options, message.event.filesystemRequested)
|
|
6553
|
+
};
|
|
6554
|
+
break;
|
|
6530
6555
|
default:
|
|
6531
6556
|
let u = options.readUnknownField;
|
|
6532
6557
|
if (u === "throw")
|
|
@@ -6543,6 +6568,8 @@ class BotEvent$Type extends import_runtime4.MessageType {
|
|
|
6543
6568
|
BotChatSettingsRequested.internalBinaryWrite(message.event.chatSettingsRequested, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
6544
6569
|
if (message.event.oneofKind === "chatSettingsItemInvoked")
|
|
6545
6570
|
BotChatSettingsItemInvoked.internalBinaryWrite(message.event.chatSettingsItemInvoked, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
6571
|
+
if (message.event.oneofKind === "filesystemRequested")
|
|
6572
|
+
BotFilesystemRequested.internalBinaryWrite(message.event.filesystemRequested, writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
6546
6573
|
let u = options.writeUnknownFields;
|
|
6547
6574
|
if (u !== false)
|
|
6548
6575
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -7699,7 +7726,8 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
7699
7726
|
{ no: 15, name: "pinned_order", kind: "scalar", opt: true, T: 9 },
|
|
7700
7727
|
{ no: 16, name: "follow_mode", kind: "enum", opt: true, T: () => ["DialogFollowMode", DialogFollowMode] },
|
|
7701
7728
|
{ no: 17, name: "collapsed_max_id", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
7702
|
-
{ no: 18, name: "folder_id", kind: "scalar", opt: true, T: 3, L: 0 }
|
|
7729
|
+
{ no: 18, name: "folder_id", kind: "scalar", opt: true, T: 3, L: 0 },
|
|
7730
|
+
{ no: 19, name: "translation_enabled", kind: "scalar", opt: true, T: 8 }
|
|
7703
7731
|
]);
|
|
7704
7732
|
}
|
|
7705
7733
|
create(value) {
|
|
@@ -7767,6 +7795,9 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
7767
7795
|
case 18:
|
|
7768
7796
|
message.folderId = reader.int64().toBigInt();
|
|
7769
7797
|
break;
|
|
7798
|
+
case 19:
|
|
7799
|
+
message.translationEnabled = reader.bool();
|
|
7800
|
+
break;
|
|
7770
7801
|
default:
|
|
7771
7802
|
let u = options.readUnknownField;
|
|
7772
7803
|
if (u === "throw")
|
|
@@ -7815,6 +7846,8 @@ class Dialog$Type extends import_runtime4.MessageType {
|
|
|
7815
7846
|
writer.tag(17, import_runtime.WireType.Varint).int64(message.collapsedMaxId);
|
|
7816
7847
|
if (message.folderId !== undefined)
|
|
7817
7848
|
writer.tag(18, import_runtime.WireType.Varint).int64(message.folderId);
|
|
7849
|
+
if (message.translationEnabled !== undefined)
|
|
7850
|
+
writer.tag(19, import_runtime.WireType.Varint).bool(message.translationEnabled);
|
|
7818
7851
|
let u = options.writeUnknownFields;
|
|
7819
7852
|
if (u !== false)
|
|
7820
7853
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -13947,7 +13980,11 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
13947
13980
|
{ no: 138, name: "acknowledgeMessages", kind: "message", oneof: "input", T: () => AcknowledgeMessagesInput },
|
|
13948
13981
|
{ no: 139, name: "getUsers", kind: "message", oneof: "input", T: () => GetUsersInput },
|
|
13949
13982
|
{ no: 140, name: "getBotSkills", kind: "message", oneof: "input", T: () => GetBotSkillsInput },
|
|
13950
|
-
{ no: 141, name: "getBotConfigurationCatalog", kind: "message", oneof: "input", T: () => GetBotConfigurationCatalogInput }
|
|
13983
|
+
{ no: 141, name: "getBotConfigurationCatalog", kind: "message", oneof: "input", T: () => GetBotConfigurationCatalogInput },
|
|
13984
|
+
{ no: 142, name: "updateDialogTranslation", kind: "message", oneof: "input", T: () => UpdateDialogTranslationInput },
|
|
13985
|
+
{ no: 143, name: "transcribeVoiceDraft", kind: "message", oneof: "input", T: () => TranscribeVoiceDraftInput },
|
|
13986
|
+
{ no: 144, name: "requestBotFilesystem", kind: "message", oneof: "input", T: () => RequestBotFilesystemInput },
|
|
13987
|
+
{ no: 145, name: "answerBotFilesystem", kind: "message", oneof: "input", T: () => AnswerBotFilesystemInput }
|
|
13951
13988
|
]);
|
|
13952
13989
|
}
|
|
13953
13990
|
create(value) {
|
|
@@ -14800,6 +14837,30 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
14800
14837
|
getBotConfigurationCatalog: GetBotConfigurationCatalogInput.internalBinaryRead(reader, reader.uint32(), options, message.input.getBotConfigurationCatalog)
|
|
14801
14838
|
};
|
|
14802
14839
|
break;
|
|
14840
|
+
case 142:
|
|
14841
|
+
message.input = {
|
|
14842
|
+
oneofKind: "updateDialogTranslation",
|
|
14843
|
+
updateDialogTranslation: UpdateDialogTranslationInput.internalBinaryRead(reader, reader.uint32(), options, message.input.updateDialogTranslation)
|
|
14844
|
+
};
|
|
14845
|
+
break;
|
|
14846
|
+
case 143:
|
|
14847
|
+
message.input = {
|
|
14848
|
+
oneofKind: "transcribeVoiceDraft",
|
|
14849
|
+
transcribeVoiceDraft: TranscribeVoiceDraftInput.internalBinaryRead(reader, reader.uint32(), options, message.input.transcribeVoiceDraft)
|
|
14850
|
+
};
|
|
14851
|
+
break;
|
|
14852
|
+
case 144:
|
|
14853
|
+
message.input = {
|
|
14854
|
+
oneofKind: "requestBotFilesystem",
|
|
14855
|
+
requestBotFilesystem: RequestBotFilesystemInput.internalBinaryRead(reader, reader.uint32(), options, message.input.requestBotFilesystem)
|
|
14856
|
+
};
|
|
14857
|
+
break;
|
|
14858
|
+
case 145:
|
|
14859
|
+
message.input = {
|
|
14860
|
+
oneofKind: "answerBotFilesystem",
|
|
14861
|
+
answerBotFilesystem: AnswerBotFilesystemInput.internalBinaryRead(reader, reader.uint32(), options, message.input.answerBotFilesystem)
|
|
14862
|
+
};
|
|
14863
|
+
break;
|
|
14803
14864
|
default:
|
|
14804
14865
|
let u = options.readUnknownField;
|
|
14805
14866
|
if (u === "throw")
|
|
@@ -15092,6 +15153,14 @@ class RpcCall$Type extends import_runtime4.MessageType {
|
|
|
15092
15153
|
GetBotSkillsInput.internalBinaryWrite(message.input.getBotSkills, writer.tag(140, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15093
15154
|
if (message.input.oneofKind === "getBotConfigurationCatalog")
|
|
15094
15155
|
GetBotConfigurationCatalogInput.internalBinaryWrite(message.input.getBotConfigurationCatalog, writer.tag(141, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15156
|
+
if (message.input.oneofKind === "updateDialogTranslation")
|
|
15157
|
+
UpdateDialogTranslationInput.internalBinaryWrite(message.input.updateDialogTranslation, writer.tag(142, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15158
|
+
if (message.input.oneofKind === "transcribeVoiceDraft")
|
|
15159
|
+
TranscribeVoiceDraftInput.internalBinaryWrite(message.input.transcribeVoiceDraft, writer.tag(143, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15160
|
+
if (message.input.oneofKind === "requestBotFilesystem")
|
|
15161
|
+
RequestBotFilesystemInput.internalBinaryWrite(message.input.requestBotFilesystem, writer.tag(144, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15162
|
+
if (message.input.oneofKind === "answerBotFilesystem")
|
|
15163
|
+
AnswerBotFilesystemInput.internalBinaryWrite(message.input.answerBotFilesystem, writer.tag(145, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
15095
15164
|
let u = options.writeUnknownFields;
|
|
15096
15165
|
if (u !== false)
|
|
15097
15166
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -15242,7 +15311,11 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
15242
15311
|
{ no: 138, name: "acknowledgeMessages", kind: "message", oneof: "result", T: () => AcknowledgeMessagesResult },
|
|
15243
15312
|
{ no: 139, name: "getUsers", kind: "message", oneof: "result", T: () => GetUsersResult },
|
|
15244
15313
|
{ no: 140, name: "getBotSkills", kind: "message", oneof: "result", T: () => GetBotSkillsResult },
|
|
15245
|
-
{ no: 141, name: "getBotConfigurationCatalog", kind: "message", oneof: "result", T: () => GetBotConfigurationCatalogResult }
|
|
15314
|
+
{ no: 141, name: "getBotConfigurationCatalog", kind: "message", oneof: "result", T: () => GetBotConfigurationCatalogResult },
|
|
15315
|
+
{ no: 142, name: "updateDialogTranslation", kind: "message", oneof: "result", T: () => UpdateDialogTranslationResult },
|
|
15316
|
+
{ no: 143, name: "transcribeVoiceDraft", kind: "message", oneof: "result", T: () => TranscribeVoiceDraftResult },
|
|
15317
|
+
{ no: 144, name: "requestBotFilesystem", kind: "message", oneof: "result", T: () => RequestBotFilesystemResult },
|
|
15318
|
+
{ no: 145, name: "answerBotFilesystem", kind: "message", oneof: "result", T: () => AnswerBotFilesystemResult }
|
|
15246
15319
|
]);
|
|
15247
15320
|
}
|
|
15248
15321
|
create(value) {
|
|
@@ -16095,6 +16168,30 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
16095
16168
|
getBotConfigurationCatalog: GetBotConfigurationCatalogResult.internalBinaryRead(reader, reader.uint32(), options, message.result.getBotConfigurationCatalog)
|
|
16096
16169
|
};
|
|
16097
16170
|
break;
|
|
16171
|
+
case 142:
|
|
16172
|
+
message.result = {
|
|
16173
|
+
oneofKind: "updateDialogTranslation",
|
|
16174
|
+
updateDialogTranslation: UpdateDialogTranslationResult.internalBinaryRead(reader, reader.uint32(), options, message.result.updateDialogTranslation)
|
|
16175
|
+
};
|
|
16176
|
+
break;
|
|
16177
|
+
case 143:
|
|
16178
|
+
message.result = {
|
|
16179
|
+
oneofKind: "transcribeVoiceDraft",
|
|
16180
|
+
transcribeVoiceDraft: TranscribeVoiceDraftResult.internalBinaryRead(reader, reader.uint32(), options, message.result.transcribeVoiceDraft)
|
|
16181
|
+
};
|
|
16182
|
+
break;
|
|
16183
|
+
case 144:
|
|
16184
|
+
message.result = {
|
|
16185
|
+
oneofKind: "requestBotFilesystem",
|
|
16186
|
+
requestBotFilesystem: RequestBotFilesystemResult.internalBinaryRead(reader, reader.uint32(), options, message.result.requestBotFilesystem)
|
|
16187
|
+
};
|
|
16188
|
+
break;
|
|
16189
|
+
case 145:
|
|
16190
|
+
message.result = {
|
|
16191
|
+
oneofKind: "answerBotFilesystem",
|
|
16192
|
+
answerBotFilesystem: AnswerBotFilesystemResult.internalBinaryRead(reader, reader.uint32(), options, message.result.answerBotFilesystem)
|
|
16193
|
+
};
|
|
16194
|
+
break;
|
|
16098
16195
|
default:
|
|
16099
16196
|
let u = options.readUnknownField;
|
|
16100
16197
|
if (u === "throw")
|
|
@@ -16387,6 +16484,14 @@ class RpcResult$Type extends import_runtime4.MessageType {
|
|
|
16387
16484
|
GetBotSkillsResult.internalBinaryWrite(message.result.getBotSkills, writer.tag(140, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16388
16485
|
if (message.result.oneofKind === "getBotConfigurationCatalog")
|
|
16389
16486
|
GetBotConfigurationCatalogResult.internalBinaryWrite(message.result.getBotConfigurationCatalog, writer.tag(141, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16487
|
+
if (message.result.oneofKind === "updateDialogTranslation")
|
|
16488
|
+
UpdateDialogTranslationResult.internalBinaryWrite(message.result.updateDialogTranslation, writer.tag(142, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16489
|
+
if (message.result.oneofKind === "transcribeVoiceDraft")
|
|
16490
|
+
TranscribeVoiceDraftResult.internalBinaryWrite(message.result.transcribeVoiceDraft, writer.tag(143, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16491
|
+
if (message.result.oneofKind === "requestBotFilesystem")
|
|
16492
|
+
RequestBotFilesystemResult.internalBinaryWrite(message.result.requestBotFilesystem, writer.tag(144, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16493
|
+
if (message.result.oneofKind === "answerBotFilesystem")
|
|
16494
|
+
AnswerBotFilesystemResult.internalBinaryWrite(message.result.answerBotFilesystem, writer.tag(145, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
16390
16495
|
let u = options.writeUnknownFields;
|
|
16391
16496
|
if (u !== false)
|
|
16392
16497
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -19951,6 +20056,153 @@ class UpdateDialogFollowModeResult$Type extends import_runtime4.MessageType {
|
|
|
19951
20056
|
}
|
|
19952
20057
|
var UpdateDialogFollowModeResult = new UpdateDialogFollowModeResult$Type;
|
|
19953
20058
|
|
|
20059
|
+
class UpdateDialogTranslationInput$Type extends import_runtime4.MessageType {
|
|
20060
|
+
constructor() {
|
|
20061
|
+
super("UpdateDialogTranslationInput", [
|
|
20062
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer },
|
|
20063
|
+
{ no: 2, name: "enabled", kind: "scalar", opt: true, T: 8 },
|
|
20064
|
+
{ no: 3, name: "import_legacy_enabled", kind: "scalar", T: 8 }
|
|
20065
|
+
]);
|
|
20066
|
+
}
|
|
20067
|
+
create(value) {
|
|
20068
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
20069
|
+
message.importLegacyEnabled = false;
|
|
20070
|
+
if (value !== undefined)
|
|
20071
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
20072
|
+
return message;
|
|
20073
|
+
}
|
|
20074
|
+
internalBinaryRead(reader, length, options, target) {
|
|
20075
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
20076
|
+
while (reader.pos < end) {
|
|
20077
|
+
let [fieldNo, wireType] = reader.tag();
|
|
20078
|
+
switch (fieldNo) {
|
|
20079
|
+
case 1:
|
|
20080
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
20081
|
+
break;
|
|
20082
|
+
case 2:
|
|
20083
|
+
message.enabled = reader.bool();
|
|
20084
|
+
break;
|
|
20085
|
+
case 3:
|
|
20086
|
+
message.importLegacyEnabled = reader.bool();
|
|
20087
|
+
break;
|
|
20088
|
+
default:
|
|
20089
|
+
let u = options.readUnknownField;
|
|
20090
|
+
if (u === "throw")
|
|
20091
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
20092
|
+
let d = reader.skip(wireType);
|
|
20093
|
+
if (u !== false)
|
|
20094
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
20095
|
+
}
|
|
20096
|
+
}
|
|
20097
|
+
return message;
|
|
20098
|
+
}
|
|
20099
|
+
internalBinaryWrite(message, writer, options) {
|
|
20100
|
+
if (message.peerId)
|
|
20101
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
20102
|
+
if (message.enabled !== undefined)
|
|
20103
|
+
writer.tag(2, import_runtime.WireType.Varint).bool(message.enabled);
|
|
20104
|
+
if (message.importLegacyEnabled !== false)
|
|
20105
|
+
writer.tag(3, import_runtime.WireType.Varint).bool(message.importLegacyEnabled);
|
|
20106
|
+
let u = options.writeUnknownFields;
|
|
20107
|
+
if (u !== false)
|
|
20108
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
20109
|
+
return writer;
|
|
20110
|
+
}
|
|
20111
|
+
}
|
|
20112
|
+
var UpdateDialogTranslationInput = new UpdateDialogTranslationInput$Type;
|
|
20113
|
+
|
|
20114
|
+
class UpdateDialogTranslationResult$Type extends import_runtime4.MessageType {
|
|
20115
|
+
constructor() {
|
|
20116
|
+
super("UpdateDialogTranslationResult", [
|
|
20117
|
+
{ no: 1, name: "updates", kind: "message", repeat: 1, T: () => Update }
|
|
20118
|
+
]);
|
|
20119
|
+
}
|
|
20120
|
+
create(value) {
|
|
20121
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
20122
|
+
message.updates = [];
|
|
20123
|
+
if (value !== undefined)
|
|
20124
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
20125
|
+
return message;
|
|
20126
|
+
}
|
|
20127
|
+
internalBinaryRead(reader, length, options, target) {
|
|
20128
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
20129
|
+
while (reader.pos < end) {
|
|
20130
|
+
let [fieldNo, wireType] = reader.tag();
|
|
20131
|
+
switch (fieldNo) {
|
|
20132
|
+
case 1:
|
|
20133
|
+
message.updates.push(Update.internalBinaryRead(reader, reader.uint32(), options));
|
|
20134
|
+
break;
|
|
20135
|
+
default:
|
|
20136
|
+
let u = options.readUnknownField;
|
|
20137
|
+
if (u === "throw")
|
|
20138
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
20139
|
+
let d = reader.skip(wireType);
|
|
20140
|
+
if (u !== false)
|
|
20141
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
20142
|
+
}
|
|
20143
|
+
}
|
|
20144
|
+
return message;
|
|
20145
|
+
}
|
|
20146
|
+
internalBinaryWrite(message, writer, options) {
|
|
20147
|
+
for (let i = 0;i < message.updates.length; i++)
|
|
20148
|
+
Update.internalBinaryWrite(message.updates[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
20149
|
+
let u = options.writeUnknownFields;
|
|
20150
|
+
if (u !== false)
|
|
20151
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
20152
|
+
return writer;
|
|
20153
|
+
}
|
|
20154
|
+
}
|
|
20155
|
+
var UpdateDialogTranslationResult = new UpdateDialogTranslationResult$Type;
|
|
20156
|
+
|
|
20157
|
+
class UpdateDialogTranslation$Type extends import_runtime4.MessageType {
|
|
20158
|
+
constructor() {
|
|
20159
|
+
super("UpdateDialogTranslation", [
|
|
20160
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => Peer },
|
|
20161
|
+
{ no: 2, name: "enabled", kind: "scalar", T: 8 }
|
|
20162
|
+
]);
|
|
20163
|
+
}
|
|
20164
|
+
create(value) {
|
|
20165
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
20166
|
+
message.enabled = false;
|
|
20167
|
+
if (value !== undefined)
|
|
20168
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
20169
|
+
return message;
|
|
20170
|
+
}
|
|
20171
|
+
internalBinaryRead(reader, length, options, target) {
|
|
20172
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
20173
|
+
while (reader.pos < end) {
|
|
20174
|
+
let [fieldNo, wireType] = reader.tag();
|
|
20175
|
+
switch (fieldNo) {
|
|
20176
|
+
case 1:
|
|
20177
|
+
message.peerId = Peer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
20178
|
+
break;
|
|
20179
|
+
case 2:
|
|
20180
|
+
message.enabled = reader.bool();
|
|
20181
|
+
break;
|
|
20182
|
+
default:
|
|
20183
|
+
let u = options.readUnknownField;
|
|
20184
|
+
if (u === "throw")
|
|
20185
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
20186
|
+
let d = reader.skip(wireType);
|
|
20187
|
+
if (u !== false)
|
|
20188
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
20189
|
+
}
|
|
20190
|
+
}
|
|
20191
|
+
return message;
|
|
20192
|
+
}
|
|
20193
|
+
internalBinaryWrite(message, writer, options) {
|
|
20194
|
+
if (message.peerId)
|
|
20195
|
+
Peer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
20196
|
+
if (message.enabled !== false)
|
|
20197
|
+
writer.tag(2, import_runtime.WireType.Varint).bool(message.enabled);
|
|
20198
|
+
let u = options.writeUnknownFields;
|
|
20199
|
+
if (u !== false)
|
|
20200
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
20201
|
+
return writer;
|
|
20202
|
+
}
|
|
20203
|
+
}
|
|
20204
|
+
var UpdateDialogTranslation = new UpdateDialogTranslation$Type;
|
|
20205
|
+
|
|
19954
20206
|
class CollapseHistoryInput$Type extends import_runtime4.MessageType {
|
|
19955
20207
|
constructor() {
|
|
19956
20208
|
super("CollapseHistoryInput", [
|
|
@@ -29477,7 +29729,8 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
29477
29729
|
{ no: 46, name: "dialog_folder", kind: "message", oneof: "update", T: () => UpdateDialogFolder },
|
|
29478
29730
|
{ no: 47, name: "user_added_to_chat", kind: "message", oneof: "update", T: () => UpdateUserAddedToChat },
|
|
29479
29731
|
{ no: 48, name: "user_removed_from_chat", kind: "message", oneof: "update", T: () => UpdateUserRemovedFromChat },
|
|
29480
|
-
{ no: 49, name: "acknowledgement", kind: "message", oneof: "update", T: () => ChatAcknowledgement }
|
|
29732
|
+
{ no: 49, name: "acknowledgement", kind: "message", oneof: "update", T: () => ChatAcknowledgement },
|
|
29733
|
+
{ no: 50, name: "dialog_translation", kind: "message", oneof: "update", T: () => UpdateDialogTranslation }
|
|
29481
29734
|
]);
|
|
29482
29735
|
}
|
|
29483
29736
|
create(value) {
|
|
@@ -29774,6 +30027,12 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
29774
30027
|
acknowledgement: ChatAcknowledgement.internalBinaryRead(reader, reader.uint32(), options, message.update.acknowledgement)
|
|
29775
30028
|
};
|
|
29776
30029
|
break;
|
|
30030
|
+
case 50:
|
|
30031
|
+
message.update = {
|
|
30032
|
+
oneofKind: "dialogTranslation",
|
|
30033
|
+
dialogTranslation: UpdateDialogTranslation.internalBinaryRead(reader, reader.uint32(), options, message.update.dialogTranslation)
|
|
30034
|
+
};
|
|
30035
|
+
break;
|
|
29777
30036
|
default:
|
|
29778
30037
|
let u = options.readUnknownField;
|
|
29779
30038
|
if (u === "throw")
|
|
@@ -29882,6 +30141,8 @@ class Update$Type extends import_runtime4.MessageType {
|
|
|
29882
30141
|
UpdateUserRemovedFromChat.internalBinaryWrite(message.update.userRemovedFromChat, writer.tag(48, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
29883
30142
|
if (message.update.oneofKind === "acknowledgement")
|
|
29884
30143
|
ChatAcknowledgement.internalBinaryWrite(message.update.acknowledgement, writer.tag(49, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
30144
|
+
if (message.update.oneofKind === "dialogTranslation")
|
|
30145
|
+
UpdateDialogTranslation.internalBinaryWrite(message.update.dialogTranslation, writer.tag(50, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
29885
30146
|
let u = options.writeUnknownFields;
|
|
29886
30147
|
if (u !== false)
|
|
29887
30148
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -35027,7 +35288,8 @@ class BotChatSettingsFolder$Type extends import_runtime4.MessageType {
|
|
|
35027
35288
|
{ no: 4, name: "host_label", kind: "scalar", T: 9 },
|
|
35028
35289
|
{ no: 5, name: "allows_local_picker", kind: "scalar", T: 8 },
|
|
35029
35290
|
{ no: 6, name: "local_picker_port", kind: "scalar", opt: true, T: 13 },
|
|
35030
|
-
{ no: 7, name: "local_picker_capability", kind: "scalar", opt: true, T: 9 }
|
|
35291
|
+
{ no: 7, name: "local_picker_capability", kind: "scalar", opt: true, T: 9 },
|
|
35292
|
+
{ no: 8, name: "remote_browser_version", kind: "scalar", opt: true, T: 13 }
|
|
35031
35293
|
]);
|
|
35032
35294
|
}
|
|
35033
35295
|
create(value) {
|
|
@@ -35067,6 +35329,9 @@ class BotChatSettingsFolder$Type extends import_runtime4.MessageType {
|
|
|
35067
35329
|
case 7:
|
|
35068
35330
|
message.localPickerCapability = reader.string();
|
|
35069
35331
|
break;
|
|
35332
|
+
case 8:
|
|
35333
|
+
message.remoteBrowserVersion = reader.uint32();
|
|
35334
|
+
break;
|
|
35070
35335
|
default:
|
|
35071
35336
|
let u = options.readUnknownField;
|
|
35072
35337
|
if (u === "throw")
|
|
@@ -35093,6 +35358,8 @@ class BotChatSettingsFolder$Type extends import_runtime4.MessageType {
|
|
|
35093
35358
|
writer.tag(6, import_runtime.WireType.Varint).uint32(message.localPickerPort);
|
|
35094
35359
|
if (message.localPickerCapability !== undefined)
|
|
35095
35360
|
writer.tag(7, import_runtime.WireType.LengthDelimited).string(message.localPickerCapability);
|
|
35361
|
+
if (message.remoteBrowserVersion !== undefined)
|
|
35362
|
+
writer.tag(8, import_runtime.WireType.Varint).uint32(message.remoteBrowserVersion);
|
|
35096
35363
|
let u = options.writeUnknownFields;
|
|
35097
35364
|
if (u !== false)
|
|
35098
35365
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -38337,6 +38604,542 @@ class ChatAcknowledgements$Type extends import_runtime4.MessageType {
|
|
|
38337
38604
|
}
|
|
38338
38605
|
var ChatAcknowledgements = new ChatAcknowledgements$Type;
|
|
38339
38606
|
|
|
38607
|
+
class TranscribeVoiceDraftInput$Type extends import_runtime4.MessageType {
|
|
38608
|
+
constructor() {
|
|
38609
|
+
super("TranscribeVoiceDraftInput", [
|
|
38610
|
+
{ no: 1, name: "audio", kind: "scalar", T: 12 },
|
|
38611
|
+
{ no: 2, name: "mime_type", kind: "scalar", T: 9 },
|
|
38612
|
+
{ no: 3, name: "duration", kind: "scalar", T: 13 }
|
|
38613
|
+
]);
|
|
38614
|
+
}
|
|
38615
|
+
create(value) {
|
|
38616
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38617
|
+
message.audio = new Uint8Array(0);
|
|
38618
|
+
message.mimeType = "";
|
|
38619
|
+
message.duration = 0;
|
|
38620
|
+
if (value !== undefined)
|
|
38621
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38622
|
+
return message;
|
|
38623
|
+
}
|
|
38624
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38625
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38626
|
+
while (reader.pos < end) {
|
|
38627
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38628
|
+
switch (fieldNo) {
|
|
38629
|
+
case 1:
|
|
38630
|
+
message.audio = reader.bytes();
|
|
38631
|
+
break;
|
|
38632
|
+
case 2:
|
|
38633
|
+
message.mimeType = reader.string();
|
|
38634
|
+
break;
|
|
38635
|
+
case 3:
|
|
38636
|
+
message.duration = reader.uint32();
|
|
38637
|
+
break;
|
|
38638
|
+
default:
|
|
38639
|
+
let u = options.readUnknownField;
|
|
38640
|
+
if (u === "throw")
|
|
38641
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38642
|
+
let d = reader.skip(wireType);
|
|
38643
|
+
if (u !== false)
|
|
38644
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38645
|
+
}
|
|
38646
|
+
}
|
|
38647
|
+
return message;
|
|
38648
|
+
}
|
|
38649
|
+
internalBinaryWrite(message, writer, options) {
|
|
38650
|
+
if (message.audio.length)
|
|
38651
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).bytes(message.audio);
|
|
38652
|
+
if (message.mimeType !== "")
|
|
38653
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.mimeType);
|
|
38654
|
+
if (message.duration !== 0)
|
|
38655
|
+
writer.tag(3, import_runtime.WireType.Varint).uint32(message.duration);
|
|
38656
|
+
let u = options.writeUnknownFields;
|
|
38657
|
+
if (u !== false)
|
|
38658
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38659
|
+
return writer;
|
|
38660
|
+
}
|
|
38661
|
+
}
|
|
38662
|
+
var TranscribeVoiceDraftInput = new TranscribeVoiceDraftInput$Type;
|
|
38663
|
+
|
|
38664
|
+
class TranscribeVoiceDraftResult$Type extends import_runtime4.MessageType {
|
|
38665
|
+
constructor() {
|
|
38666
|
+
super("TranscribeVoiceDraftResult", [
|
|
38667
|
+
{ no: 1, name: "text", kind: "scalar", T: 9 }
|
|
38668
|
+
]);
|
|
38669
|
+
}
|
|
38670
|
+
create(value) {
|
|
38671
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38672
|
+
message.text = "";
|
|
38673
|
+
if (value !== undefined)
|
|
38674
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38675
|
+
return message;
|
|
38676
|
+
}
|
|
38677
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38678
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38679
|
+
while (reader.pos < end) {
|
|
38680
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38681
|
+
switch (fieldNo) {
|
|
38682
|
+
case 1:
|
|
38683
|
+
message.text = reader.string();
|
|
38684
|
+
break;
|
|
38685
|
+
default:
|
|
38686
|
+
let u = options.readUnknownField;
|
|
38687
|
+
if (u === "throw")
|
|
38688
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38689
|
+
let d = reader.skip(wireType);
|
|
38690
|
+
if (u !== false)
|
|
38691
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38692
|
+
}
|
|
38693
|
+
}
|
|
38694
|
+
return message;
|
|
38695
|
+
}
|
|
38696
|
+
internalBinaryWrite(message, writer, options) {
|
|
38697
|
+
if (message.text !== "")
|
|
38698
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.text);
|
|
38699
|
+
let u = options.writeUnknownFields;
|
|
38700
|
+
if (u !== false)
|
|
38701
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38702
|
+
return writer;
|
|
38703
|
+
}
|
|
38704
|
+
}
|
|
38705
|
+
var TranscribeVoiceDraftResult = new TranscribeVoiceDraftResult$Type;
|
|
38706
|
+
|
|
38707
|
+
class RequestBotFilesystemInput$Type extends import_runtime4.MessageType {
|
|
38708
|
+
constructor() {
|
|
38709
|
+
super("RequestBotFilesystemInput", [
|
|
38710
|
+
{ no: 1, name: "peer_id", kind: "message", T: () => InputPeer },
|
|
38711
|
+
{ no: 2, name: "bot_user_id", kind: "scalar", T: 3, L: 0 },
|
|
38712
|
+
{ no: 3, name: "host_installation_id", kind: "scalar", T: 9 },
|
|
38713
|
+
{ no: 4, name: "operation", kind: "enum", T: () => ["RequestBotFilesystemInput.Operation", RequestBotFilesystemInput_Operation] },
|
|
38714
|
+
{ no: 5, name: "path", kind: "scalar", T: 9 },
|
|
38715
|
+
{ no: 6, name: "after", kind: "scalar", T: 9 }
|
|
38716
|
+
]);
|
|
38717
|
+
}
|
|
38718
|
+
create(value) {
|
|
38719
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38720
|
+
message.botUserId = 0n;
|
|
38721
|
+
message.hostInstallationId = "";
|
|
38722
|
+
message.operation = 0;
|
|
38723
|
+
message.path = "";
|
|
38724
|
+
message.after = "";
|
|
38725
|
+
if (value !== undefined)
|
|
38726
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38727
|
+
return message;
|
|
38728
|
+
}
|
|
38729
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38730
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38731
|
+
while (reader.pos < end) {
|
|
38732
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38733
|
+
switch (fieldNo) {
|
|
38734
|
+
case 1:
|
|
38735
|
+
message.peerId = InputPeer.internalBinaryRead(reader, reader.uint32(), options, message.peerId);
|
|
38736
|
+
break;
|
|
38737
|
+
case 2:
|
|
38738
|
+
message.botUserId = reader.int64().toBigInt();
|
|
38739
|
+
break;
|
|
38740
|
+
case 3:
|
|
38741
|
+
message.hostInstallationId = reader.string();
|
|
38742
|
+
break;
|
|
38743
|
+
case 4:
|
|
38744
|
+
message.operation = reader.int32();
|
|
38745
|
+
break;
|
|
38746
|
+
case 5:
|
|
38747
|
+
message.path = reader.string();
|
|
38748
|
+
break;
|
|
38749
|
+
case 6:
|
|
38750
|
+
message.after = reader.string();
|
|
38751
|
+
break;
|
|
38752
|
+
default:
|
|
38753
|
+
let u = options.readUnknownField;
|
|
38754
|
+
if (u === "throw")
|
|
38755
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38756
|
+
let d = reader.skip(wireType);
|
|
38757
|
+
if (u !== false)
|
|
38758
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38759
|
+
}
|
|
38760
|
+
}
|
|
38761
|
+
return message;
|
|
38762
|
+
}
|
|
38763
|
+
internalBinaryWrite(message, writer, options) {
|
|
38764
|
+
if (message.peerId)
|
|
38765
|
+
InputPeer.internalBinaryWrite(message.peerId, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
38766
|
+
if (message.botUserId !== 0n)
|
|
38767
|
+
writer.tag(2, import_runtime.WireType.Varint).int64(message.botUserId);
|
|
38768
|
+
if (message.hostInstallationId !== "")
|
|
38769
|
+
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.hostInstallationId);
|
|
38770
|
+
if (message.operation !== 0)
|
|
38771
|
+
writer.tag(4, import_runtime.WireType.Varint).int32(message.operation);
|
|
38772
|
+
if (message.path !== "")
|
|
38773
|
+
writer.tag(5, import_runtime.WireType.LengthDelimited).string(message.path);
|
|
38774
|
+
if (message.after !== "")
|
|
38775
|
+
writer.tag(6, import_runtime.WireType.LengthDelimited).string(message.after);
|
|
38776
|
+
let u = options.writeUnknownFields;
|
|
38777
|
+
if (u !== false)
|
|
38778
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38779
|
+
return writer;
|
|
38780
|
+
}
|
|
38781
|
+
}
|
|
38782
|
+
var RequestBotFilesystemInput = new RequestBotFilesystemInput$Type;
|
|
38783
|
+
|
|
38784
|
+
class BotFilesystemEntry$Type extends import_runtime4.MessageType {
|
|
38785
|
+
constructor() {
|
|
38786
|
+
super("BotFilesystemEntry", [
|
|
38787
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 },
|
|
38788
|
+
{ no: 2, name: "kind", kind: "enum", T: () => ["BotFilesystemEntry.Kind", BotFilesystemEntry_Kind] },
|
|
38789
|
+
{ no: 3, name: "size", kind: "scalar", T: 4, L: 0 }
|
|
38790
|
+
]);
|
|
38791
|
+
}
|
|
38792
|
+
create(value) {
|
|
38793
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38794
|
+
message.name = "";
|
|
38795
|
+
message.kind = 0;
|
|
38796
|
+
message.size = 0n;
|
|
38797
|
+
if (value !== undefined)
|
|
38798
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38799
|
+
return message;
|
|
38800
|
+
}
|
|
38801
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38802
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38803
|
+
while (reader.pos < end) {
|
|
38804
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38805
|
+
switch (fieldNo) {
|
|
38806
|
+
case 1:
|
|
38807
|
+
message.name = reader.string();
|
|
38808
|
+
break;
|
|
38809
|
+
case 2:
|
|
38810
|
+
message.kind = reader.int32();
|
|
38811
|
+
break;
|
|
38812
|
+
case 3:
|
|
38813
|
+
message.size = reader.uint64().toBigInt();
|
|
38814
|
+
break;
|
|
38815
|
+
default:
|
|
38816
|
+
let u = options.readUnknownField;
|
|
38817
|
+
if (u === "throw")
|
|
38818
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38819
|
+
let d = reader.skip(wireType);
|
|
38820
|
+
if (u !== false)
|
|
38821
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38822
|
+
}
|
|
38823
|
+
}
|
|
38824
|
+
return message;
|
|
38825
|
+
}
|
|
38826
|
+
internalBinaryWrite(message, writer, options) {
|
|
38827
|
+
if (message.name !== "")
|
|
38828
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.name);
|
|
38829
|
+
if (message.kind !== 0)
|
|
38830
|
+
writer.tag(2, import_runtime.WireType.Varint).int32(message.kind);
|
|
38831
|
+
if (message.size !== 0n)
|
|
38832
|
+
writer.tag(3, import_runtime.WireType.Varint).uint64(message.size);
|
|
38833
|
+
let u = options.writeUnknownFields;
|
|
38834
|
+
if (u !== false)
|
|
38835
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38836
|
+
return writer;
|
|
38837
|
+
}
|
|
38838
|
+
}
|
|
38839
|
+
var BotFilesystemEntry = new BotFilesystemEntry$Type;
|
|
38840
|
+
|
|
38841
|
+
class BotFilesystemListing$Type extends import_runtime4.MessageType {
|
|
38842
|
+
constructor() {
|
|
38843
|
+
super("BotFilesystemListing", [
|
|
38844
|
+
{ no: 1, name: "path", kind: "scalar", T: 9 },
|
|
38845
|
+
{ no: 2, name: "parent_path", kind: "scalar", opt: true, T: 9 },
|
|
38846
|
+
{ no: 3, name: "entries", kind: "message", repeat: 1, T: () => BotFilesystemEntry },
|
|
38847
|
+
{ no: 4, name: "next_after", kind: "scalar", opt: true, T: 9 }
|
|
38848
|
+
]);
|
|
38849
|
+
}
|
|
38850
|
+
create(value) {
|
|
38851
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38852
|
+
message.path = "";
|
|
38853
|
+
message.entries = [];
|
|
38854
|
+
if (value !== undefined)
|
|
38855
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38856
|
+
return message;
|
|
38857
|
+
}
|
|
38858
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38859
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38860
|
+
while (reader.pos < end) {
|
|
38861
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38862
|
+
switch (fieldNo) {
|
|
38863
|
+
case 1:
|
|
38864
|
+
message.path = reader.string();
|
|
38865
|
+
break;
|
|
38866
|
+
case 2:
|
|
38867
|
+
message.parentPath = reader.string();
|
|
38868
|
+
break;
|
|
38869
|
+
case 3:
|
|
38870
|
+
message.entries.push(BotFilesystemEntry.internalBinaryRead(reader, reader.uint32(), options));
|
|
38871
|
+
break;
|
|
38872
|
+
case 4:
|
|
38873
|
+
message.nextAfter = reader.string();
|
|
38874
|
+
break;
|
|
38875
|
+
default:
|
|
38876
|
+
let u = options.readUnknownField;
|
|
38877
|
+
if (u === "throw")
|
|
38878
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38879
|
+
let d = reader.skip(wireType);
|
|
38880
|
+
if (u !== false)
|
|
38881
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38882
|
+
}
|
|
38883
|
+
}
|
|
38884
|
+
return message;
|
|
38885
|
+
}
|
|
38886
|
+
internalBinaryWrite(message, writer, options) {
|
|
38887
|
+
if (message.path !== "")
|
|
38888
|
+
writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.path);
|
|
38889
|
+
if (message.parentPath !== undefined)
|
|
38890
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.parentPath);
|
|
38891
|
+
for (let i = 0;i < message.entries.length; i++)
|
|
38892
|
+
BotFilesystemEntry.internalBinaryWrite(message.entries[i], writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
38893
|
+
if (message.nextAfter !== undefined)
|
|
38894
|
+
writer.tag(4, import_runtime.WireType.LengthDelimited).string(message.nextAfter);
|
|
38895
|
+
let u = options.writeUnknownFields;
|
|
38896
|
+
if (u !== false)
|
|
38897
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38898
|
+
return writer;
|
|
38899
|
+
}
|
|
38900
|
+
}
|
|
38901
|
+
var BotFilesystemListing = new BotFilesystemListing$Type;
|
|
38902
|
+
|
|
38903
|
+
class BotFilesystemResponse$Type extends import_runtime4.MessageType {
|
|
38904
|
+
constructor() {
|
|
38905
|
+
super("BotFilesystemResponse", [
|
|
38906
|
+
{ no: 1, name: "listing", kind: "message", oneof: "result", T: () => BotFilesystemListing },
|
|
38907
|
+
{ no: 2, name: "workspace_id", kind: "scalar", oneof: "result", T: 9 },
|
|
38908
|
+
{ no: 3, name: "problem", kind: "scalar", oneof: "result", T: 9 }
|
|
38909
|
+
]);
|
|
38910
|
+
}
|
|
38911
|
+
create(value) {
|
|
38912
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38913
|
+
message.result = { oneofKind: undefined };
|
|
38914
|
+
if (value !== undefined)
|
|
38915
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38916
|
+
return message;
|
|
38917
|
+
}
|
|
38918
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38919
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38920
|
+
while (reader.pos < end) {
|
|
38921
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38922
|
+
switch (fieldNo) {
|
|
38923
|
+
case 1:
|
|
38924
|
+
message.result = {
|
|
38925
|
+
oneofKind: "listing",
|
|
38926
|
+
listing: BotFilesystemListing.internalBinaryRead(reader, reader.uint32(), options, message.result.listing)
|
|
38927
|
+
};
|
|
38928
|
+
break;
|
|
38929
|
+
case 2:
|
|
38930
|
+
message.result = {
|
|
38931
|
+
oneofKind: "workspaceId",
|
|
38932
|
+
workspaceId: reader.string()
|
|
38933
|
+
};
|
|
38934
|
+
break;
|
|
38935
|
+
case 3:
|
|
38936
|
+
message.result = {
|
|
38937
|
+
oneofKind: "problem",
|
|
38938
|
+
problem: reader.string()
|
|
38939
|
+
};
|
|
38940
|
+
break;
|
|
38941
|
+
default:
|
|
38942
|
+
let u = options.readUnknownField;
|
|
38943
|
+
if (u === "throw")
|
|
38944
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38945
|
+
let d = reader.skip(wireType);
|
|
38946
|
+
if (u !== false)
|
|
38947
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38948
|
+
}
|
|
38949
|
+
}
|
|
38950
|
+
return message;
|
|
38951
|
+
}
|
|
38952
|
+
internalBinaryWrite(message, writer, options) {
|
|
38953
|
+
if (message.result.oneofKind === "listing")
|
|
38954
|
+
BotFilesystemListing.internalBinaryWrite(message.result.listing, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
38955
|
+
if (message.result.oneofKind === "workspaceId")
|
|
38956
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.result.workspaceId);
|
|
38957
|
+
if (message.result.oneofKind === "problem")
|
|
38958
|
+
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.result.problem);
|
|
38959
|
+
let u = options.writeUnknownFields;
|
|
38960
|
+
if (u !== false)
|
|
38961
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
38962
|
+
return writer;
|
|
38963
|
+
}
|
|
38964
|
+
}
|
|
38965
|
+
var BotFilesystemResponse = new BotFilesystemResponse$Type;
|
|
38966
|
+
|
|
38967
|
+
class RequestBotFilesystemResult$Type extends import_runtime4.MessageType {
|
|
38968
|
+
constructor() {
|
|
38969
|
+
super("RequestBotFilesystemResult", [
|
|
38970
|
+
{ no: 1, name: "response", kind: "message", T: () => BotFilesystemResponse }
|
|
38971
|
+
]);
|
|
38972
|
+
}
|
|
38973
|
+
create(value) {
|
|
38974
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
38975
|
+
if (value !== undefined)
|
|
38976
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
38977
|
+
return message;
|
|
38978
|
+
}
|
|
38979
|
+
internalBinaryRead(reader, length, options, target) {
|
|
38980
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
38981
|
+
while (reader.pos < end) {
|
|
38982
|
+
let [fieldNo, wireType] = reader.tag();
|
|
38983
|
+
switch (fieldNo) {
|
|
38984
|
+
case 1:
|
|
38985
|
+
message.response = BotFilesystemResponse.internalBinaryRead(reader, reader.uint32(), options, message.response);
|
|
38986
|
+
break;
|
|
38987
|
+
default:
|
|
38988
|
+
let u = options.readUnknownField;
|
|
38989
|
+
if (u === "throw")
|
|
38990
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
38991
|
+
let d = reader.skip(wireType);
|
|
38992
|
+
if (u !== false)
|
|
38993
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
38994
|
+
}
|
|
38995
|
+
}
|
|
38996
|
+
return message;
|
|
38997
|
+
}
|
|
38998
|
+
internalBinaryWrite(message, writer, options) {
|
|
38999
|
+
if (message.response)
|
|
39000
|
+
BotFilesystemResponse.internalBinaryWrite(message.response, writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
39001
|
+
let u = options.writeUnknownFields;
|
|
39002
|
+
if (u !== false)
|
|
39003
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
39004
|
+
return writer;
|
|
39005
|
+
}
|
|
39006
|
+
}
|
|
39007
|
+
var RequestBotFilesystemResult = new RequestBotFilesystemResult$Type;
|
|
39008
|
+
|
|
39009
|
+
class BotFilesystemRequested$Type extends import_runtime4.MessageType {
|
|
39010
|
+
constructor() {
|
|
39011
|
+
super("BotFilesystemRequested", [
|
|
39012
|
+
{ no: 1, name: "request_id", kind: "scalar", T: 4, L: 0 },
|
|
39013
|
+
{ no: 2, name: "actor_user_id", kind: "scalar", T: 3, L: 0 },
|
|
39014
|
+
{ no: 3, name: "chat_id", kind: "scalar", T: 3, L: 0 },
|
|
39015
|
+
{ no: 4, name: "input", kind: "message", T: () => RequestBotFilesystemInput }
|
|
39016
|
+
]);
|
|
39017
|
+
}
|
|
39018
|
+
create(value) {
|
|
39019
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
39020
|
+
message.requestId = 0n;
|
|
39021
|
+
message.actorUserId = 0n;
|
|
39022
|
+
message.chatId = 0n;
|
|
39023
|
+
if (value !== undefined)
|
|
39024
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
39025
|
+
return message;
|
|
39026
|
+
}
|
|
39027
|
+
internalBinaryRead(reader, length, options, target) {
|
|
39028
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
39029
|
+
while (reader.pos < end) {
|
|
39030
|
+
let [fieldNo, wireType] = reader.tag();
|
|
39031
|
+
switch (fieldNo) {
|
|
39032
|
+
case 1:
|
|
39033
|
+
message.requestId = reader.uint64().toBigInt();
|
|
39034
|
+
break;
|
|
39035
|
+
case 2:
|
|
39036
|
+
message.actorUserId = reader.int64().toBigInt();
|
|
39037
|
+
break;
|
|
39038
|
+
case 3:
|
|
39039
|
+
message.chatId = reader.int64().toBigInt();
|
|
39040
|
+
break;
|
|
39041
|
+
case 4:
|
|
39042
|
+
message.input = RequestBotFilesystemInput.internalBinaryRead(reader, reader.uint32(), options, message.input);
|
|
39043
|
+
break;
|
|
39044
|
+
default:
|
|
39045
|
+
let u = options.readUnknownField;
|
|
39046
|
+
if (u === "throw")
|
|
39047
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
39048
|
+
let d = reader.skip(wireType);
|
|
39049
|
+
if (u !== false)
|
|
39050
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
39051
|
+
}
|
|
39052
|
+
}
|
|
39053
|
+
return message;
|
|
39054
|
+
}
|
|
39055
|
+
internalBinaryWrite(message, writer, options) {
|
|
39056
|
+
if (message.requestId !== 0n)
|
|
39057
|
+
writer.tag(1, import_runtime.WireType.Varint).uint64(message.requestId);
|
|
39058
|
+
if (message.actorUserId !== 0n)
|
|
39059
|
+
writer.tag(2, import_runtime.WireType.Varint).int64(message.actorUserId);
|
|
39060
|
+
if (message.chatId !== 0n)
|
|
39061
|
+
writer.tag(3, import_runtime.WireType.Varint).int64(message.chatId);
|
|
39062
|
+
if (message.input)
|
|
39063
|
+
RequestBotFilesystemInput.internalBinaryWrite(message.input, writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
39064
|
+
let u = options.writeUnknownFields;
|
|
39065
|
+
if (u !== false)
|
|
39066
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
39067
|
+
return writer;
|
|
39068
|
+
}
|
|
39069
|
+
}
|
|
39070
|
+
var BotFilesystemRequested = new BotFilesystemRequested$Type;
|
|
39071
|
+
|
|
39072
|
+
class AnswerBotFilesystemInput$Type extends import_runtime4.MessageType {
|
|
39073
|
+
constructor() {
|
|
39074
|
+
super("AnswerBotFilesystemInput", [
|
|
39075
|
+
{ no: 1, name: "request_id", kind: "scalar", T: 4, L: 0 },
|
|
39076
|
+
{ no: 2, name: "response", kind: "message", T: () => BotFilesystemResponse }
|
|
39077
|
+
]);
|
|
39078
|
+
}
|
|
39079
|
+
create(value) {
|
|
39080
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
39081
|
+
message.requestId = 0n;
|
|
39082
|
+
if (value !== undefined)
|
|
39083
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
39084
|
+
return message;
|
|
39085
|
+
}
|
|
39086
|
+
internalBinaryRead(reader, length, options, target) {
|
|
39087
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
39088
|
+
while (reader.pos < end) {
|
|
39089
|
+
let [fieldNo, wireType] = reader.tag();
|
|
39090
|
+
switch (fieldNo) {
|
|
39091
|
+
case 1:
|
|
39092
|
+
message.requestId = reader.uint64().toBigInt();
|
|
39093
|
+
break;
|
|
39094
|
+
case 2:
|
|
39095
|
+
message.response = BotFilesystemResponse.internalBinaryRead(reader, reader.uint32(), options, message.response);
|
|
39096
|
+
break;
|
|
39097
|
+
default:
|
|
39098
|
+
let u = options.readUnknownField;
|
|
39099
|
+
if (u === "throw")
|
|
39100
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
39101
|
+
let d = reader.skip(wireType);
|
|
39102
|
+
if (u !== false)
|
|
39103
|
+
(u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
39104
|
+
}
|
|
39105
|
+
}
|
|
39106
|
+
return message;
|
|
39107
|
+
}
|
|
39108
|
+
internalBinaryWrite(message, writer, options) {
|
|
39109
|
+
if (message.requestId !== 0n)
|
|
39110
|
+
writer.tag(1, import_runtime.WireType.Varint).uint64(message.requestId);
|
|
39111
|
+
if (message.response)
|
|
39112
|
+
BotFilesystemResponse.internalBinaryWrite(message.response, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
39113
|
+
let u = options.writeUnknownFields;
|
|
39114
|
+
if (u !== false)
|
|
39115
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
39116
|
+
return writer;
|
|
39117
|
+
}
|
|
39118
|
+
}
|
|
39119
|
+
var AnswerBotFilesystemInput = new AnswerBotFilesystemInput$Type;
|
|
39120
|
+
|
|
39121
|
+
class AnswerBotFilesystemResult$Type extends import_runtime4.MessageType {
|
|
39122
|
+
constructor() {
|
|
39123
|
+
super("AnswerBotFilesystemResult", []);
|
|
39124
|
+
}
|
|
39125
|
+
create(value) {
|
|
39126
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
39127
|
+
if (value !== undefined)
|
|
39128
|
+
import_runtime3.reflectionMergePartial(this, message, value);
|
|
39129
|
+
return message;
|
|
39130
|
+
}
|
|
39131
|
+
internalBinaryRead(reader, length, options, target) {
|
|
39132
|
+
return target ?? this.create();
|
|
39133
|
+
}
|
|
39134
|
+
internalBinaryWrite(message, writer, options) {
|
|
39135
|
+
let u = options.writeUnknownFields;
|
|
39136
|
+
if (u !== false)
|
|
39137
|
+
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
39138
|
+
return writer;
|
|
39139
|
+
}
|
|
39140
|
+
}
|
|
39141
|
+
var AnswerBotFilesystemResult = new AnswerBotFilesystemResult$Type;
|
|
39142
|
+
|
|
38340
39143
|
// ../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
38341
39144
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
38342
39145
|
function isBytes(a) {
|
|
@@ -39115,6 +39918,13 @@ var asInlineId = (value, fieldName = "id") => {
|
|
|
39115
39918
|
};
|
|
39116
39919
|
|
|
39117
39920
|
// ../sdk/dist/utils/async-channel.js
|
|
39921
|
+
class ChannelConsumerError extends Error {
|
|
39922
|
+
constructor(message) {
|
|
39923
|
+
super(message);
|
|
39924
|
+
this.name = "ChannelConsumerError";
|
|
39925
|
+
}
|
|
39926
|
+
}
|
|
39927
|
+
|
|
39118
39928
|
class AsyncChannelOverflowError extends Error {
|
|
39119
39929
|
capacity;
|
|
39120
39930
|
constructor(capacity) {
|
|
@@ -39224,6 +40034,7 @@ class AcknowledgedAsyncChannel {
|
|
|
39224
40034
|
closed = false;
|
|
39225
40035
|
failure = null;
|
|
39226
40036
|
iteratorClaimed = false;
|
|
40037
|
+
consumption = null;
|
|
39227
40038
|
constructor(capacity, byteLimit) {
|
|
39228
40039
|
this.capacity = capacity;
|
|
39229
40040
|
this.byteLimit = byteLimit;
|
|
@@ -39237,7 +40048,7 @@ class AcknowledgedAsyncChannel {
|
|
|
39237
40048
|
send(value) {
|
|
39238
40049
|
if (this.closed)
|
|
39239
40050
|
return Promise.resolve(false);
|
|
39240
|
-
if (!this.waiter && this.queue.length >= this.capacity) {
|
|
40051
|
+
if (!this.waiter && this.queue.length + (this.consumption?.active.size ?? 0) >= this.capacity) {
|
|
39241
40052
|
throw new AsyncChannelOverflowError(this.capacity);
|
|
39242
40053
|
}
|
|
39243
40054
|
const bytes = this.byteLimit?.byteLength(value) ?? 0;
|
|
@@ -39257,6 +40068,7 @@ class AcknowledgedAsyncChannel {
|
|
|
39257
40068
|
waiter.resolve({ value, done: false });
|
|
39258
40069
|
} else {
|
|
39259
40070
|
this.queue.push(item);
|
|
40071
|
+
this.pumpConsumption();
|
|
39260
40072
|
}
|
|
39261
40073
|
});
|
|
39262
40074
|
}
|
|
@@ -39271,6 +40083,16 @@ class AcknowledgedAsyncChannel {
|
|
|
39271
40083
|
return;
|
|
39272
40084
|
this.closed = true;
|
|
39273
40085
|
this.failure = error;
|
|
40086
|
+
const consumption = this.consumption;
|
|
40087
|
+
this.consumption = null;
|
|
40088
|
+
if (consumption) {
|
|
40089
|
+
for (const item of consumption.active.keys())
|
|
40090
|
+
item.acknowledge(false);
|
|
40091
|
+
if (error)
|
|
40092
|
+
consumption.reject(error);
|
|
40093
|
+
else
|
|
40094
|
+
consumption.resolve();
|
|
40095
|
+
}
|
|
39274
40096
|
this.active?.acknowledge(false);
|
|
39275
40097
|
this.active = null;
|
|
39276
40098
|
for (const item of this.queue)
|
|
@@ -39286,6 +40108,65 @@ class AcknowledgedAsyncChannel {
|
|
|
39286
40108
|
else
|
|
39287
40109
|
waiter.resolve({ value: undefined, done: true });
|
|
39288
40110
|
}
|
|
40111
|
+
consume(handler, key, concurrency = 8) {
|
|
40112
|
+
if (this.iteratorClaimed)
|
|
40113
|
+
return Promise.reject(new ChannelConsumerError("AcknowledgedAsyncChannel supports one consumer"));
|
|
40114
|
+
if (!Number.isSafeInteger(concurrency) || concurrency < 1) {
|
|
40115
|
+
return Promise.reject(new ChannelConsumerError("Consumer concurrency must be a positive safe integer"));
|
|
40116
|
+
}
|
|
40117
|
+
if (this.closed)
|
|
40118
|
+
return this.failure ? Promise.reject(this.failure) : Promise.resolve();
|
|
40119
|
+
this.iteratorClaimed = true;
|
|
40120
|
+
return new Promise((resolve, reject) => {
|
|
40121
|
+
this.consumption = { handler, key, concurrency, active: new Map, resolve, reject };
|
|
40122
|
+
this.pumpConsumption();
|
|
40123
|
+
});
|
|
40124
|
+
}
|
|
40125
|
+
pumpConsumption() {
|
|
40126
|
+
const owner = this.consumption;
|
|
40127
|
+
if (!owner || this.closed)
|
|
40128
|
+
return;
|
|
40129
|
+
try {
|
|
40130
|
+
while (owner.active.size < owner.concurrency && this.queue.length > 0) {
|
|
40131
|
+
if ([...owner.active.values()].includes(null))
|
|
40132
|
+
return;
|
|
40133
|
+
const keys = new Set(owner.active.values());
|
|
40134
|
+
let index = -1;
|
|
40135
|
+
let key = null;
|
|
40136
|
+
for (let i = 0;i < this.queue.length; i++) {
|
|
40137
|
+
const candidate = this.queue[i];
|
|
40138
|
+
const candidateKey = owner.key(candidate.value);
|
|
40139
|
+
if (candidateKey === null) {
|
|
40140
|
+
if (i === 0 && owner.active.size === 0)
|
|
40141
|
+
index = i;
|
|
40142
|
+
break;
|
|
40143
|
+
}
|
|
40144
|
+
if (!keys.has(candidateKey)) {
|
|
40145
|
+
index = i;
|
|
40146
|
+
key = candidateKey;
|
|
40147
|
+
break;
|
|
40148
|
+
}
|
|
40149
|
+
}
|
|
40150
|
+
if (index < 0)
|
|
40151
|
+
return;
|
|
40152
|
+
const item = this.queue.splice(index, 1)[0];
|
|
40153
|
+
owner.active.set(item, key);
|
|
40154
|
+
Promise.resolve().then(() => owner.handler(item.value)).then(() => {
|
|
40155
|
+
if (this.consumption !== owner)
|
|
40156
|
+
return;
|
|
40157
|
+
owner.active.delete(item);
|
|
40158
|
+
this.bufferedBytes -= item.bytes;
|
|
40159
|
+
item.acknowledge(true);
|
|
40160
|
+
this.pumpConsumption();
|
|
40161
|
+
}, (error) => {
|
|
40162
|
+
if (this.consumption === owner)
|
|
40163
|
+
this.fail(error instanceof Error ? error : new Error("Inbound handler failed"));
|
|
40164
|
+
});
|
|
40165
|
+
}
|
|
40166
|
+
} catch (error) {
|
|
40167
|
+
this.fail(error instanceof Error ? error : new Error("Inbound routing failed"));
|
|
40168
|
+
}
|
|
40169
|
+
}
|
|
39289
40170
|
[Symbol.asyncIterator]() {
|
|
39290
40171
|
if (this.iteratorClaimed) {
|
|
39291
40172
|
return {
|
|
@@ -39293,8 +40174,11 @@ class AcknowledgedAsyncChannel {
|
|
|
39293
40174
|
};
|
|
39294
40175
|
}
|
|
39295
40176
|
this.iteratorClaimed = true;
|
|
40177
|
+
let returned = false;
|
|
39296
40178
|
return {
|
|
39297
40179
|
next: () => {
|
|
40180
|
+
if (returned)
|
|
40181
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
39298
40182
|
if (this.active) {
|
|
39299
40183
|
this.bufferedBytes -= this.active.bytes;
|
|
39300
40184
|
this.active.acknowledge(true);
|
|
@@ -39318,6 +40202,11 @@ class AcknowledgedAsyncChannel {
|
|
|
39318
40202
|
});
|
|
39319
40203
|
},
|
|
39320
40204
|
return: () => {
|
|
40205
|
+
if (returned)
|
|
40206
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
40207
|
+
returned = true;
|
|
40208
|
+
this.waiter?.resolve({ value: undefined, done: true });
|
|
40209
|
+
this.waiter = null;
|
|
39321
40210
|
if (this.active) {
|
|
39322
40211
|
this.bufferedBytes -= this.active.bytes;
|
|
39323
40212
|
this.active.acknowledge(false);
|
|
@@ -39996,10 +40885,12 @@ var normalizeRpcTimeoutMs = (timeoutMs, fallback) => {
|
|
|
39996
40885
|
|
|
39997
40886
|
class ProtocolClientError extends Error {
|
|
39998
40887
|
code;
|
|
40888
|
+
rpcCode;
|
|
39999
40889
|
constructor(code, details) {
|
|
40000
40890
|
super(details?.message ?? code);
|
|
40001
40891
|
this.code = code;
|
|
40002
40892
|
this.name = `ProtocolClientError:${code}`;
|
|
40893
|
+
this.rpcCode = details?.code;
|
|
40003
40894
|
}
|
|
40004
40895
|
}
|
|
40005
40896
|
var commitOutcomeUnknownError = (message) => new ProtocolClientError("commit-outcome-unknown", { message });
|
|
@@ -44822,8 +45713,11 @@ class InlineSdkClient {
|
|
|
44822
45713
|
peerResolutionRequestedByChatId = new Map;
|
|
44823
45714
|
recoveryReconnectInFlight = null;
|
|
44824
45715
|
degradedUpdateBuckets = new Map;
|
|
45716
|
+
discoveryRetry = null;
|
|
45717
|
+
recoveryRetries = new Map;
|
|
44825
45718
|
liveCursorFences = new Set;
|
|
44826
45719
|
liveAdmittedSeqByBucket = new Map;
|
|
45720
|
+
liveDeliveriesByBucket = new Map;
|
|
44827
45721
|
discoveryRound = null;
|
|
44828
45722
|
discoveryInFlight = null;
|
|
44829
45723
|
discoveryCommitInFlight = null;
|
|
@@ -44916,12 +45810,14 @@ class InlineSdkClient {
|
|
|
44916
45810
|
}
|
|
44917
45811
|
}
|
|
44918
45812
|
async close() {
|
|
44919
|
-
|
|
44920
|
-
return;
|
|
45813
|
+
const wasStarted = this.started;
|
|
44921
45814
|
this.closed = true;
|
|
44922
45815
|
this.started = false;
|
|
45816
|
+
this.cancelRecoveryRetries();
|
|
44923
45817
|
this.rejectOpen(new Error("closed"));
|
|
44924
45818
|
this.eventStream.close();
|
|
45819
|
+
if (!wasStarted)
|
|
45820
|
+
return;
|
|
44925
45821
|
await settleWithin(this.protocol.stopTransport(), closeJoinTimeoutMs, () => this.log.warn?.("Timed out stopping SDK transport during close"));
|
|
44926
45822
|
await settleWithin(Promise.allSettled([
|
|
44927
45823
|
...this.catchUpInFlightByChatId.values(),
|
|
@@ -44983,6 +45879,20 @@ class InlineSdkClient {
|
|
|
44983
45879
|
events() {
|
|
44984
45880
|
return this.eventStream;
|
|
44985
45881
|
}
|
|
45882
|
+
consumeEvents(handler, options) {
|
|
45883
|
+
return this.eventStream.consume(handler, (event) => {
|
|
45884
|
+
const bucket = this.bucketForEvent(event);
|
|
45885
|
+
if (bucket?.kind === "user")
|
|
45886
|
+
return null;
|
|
45887
|
+
if (bucket)
|
|
45888
|
+
return this.updateBucketKey(bucket);
|
|
45889
|
+
return "chatId" in event && typeof event.chatId === "bigint" ? `chat:${event.chatId}` : null;
|
|
45890
|
+
}, options?.concurrency).catch(async (error) => {
|
|
45891
|
+
if (!(error instanceof ChannelConsumerError))
|
|
45892
|
+
await this.close();
|
|
45893
|
+
throw error;
|
|
45894
|
+
});
|
|
45895
|
+
}
|
|
44986
45896
|
exportState() {
|
|
44987
45897
|
return {
|
|
44988
45898
|
version: 1,
|
|
@@ -45392,6 +46302,7 @@ class InlineSdkClient {
|
|
|
45392
46302
|
this.log.error?.("SDK listener crashed", failure);
|
|
45393
46303
|
this.started = false;
|
|
45394
46304
|
this.closed = true;
|
|
46305
|
+
this.cancelRecoveryRetries();
|
|
45395
46306
|
this.rejectOpen(failure);
|
|
45396
46307
|
this.eventStream.fail(failure);
|
|
45397
46308
|
this.protocol.stopTransport().catch((stopError) => {
|
|
@@ -45404,6 +46315,7 @@ class InlineSdkClient {
|
|
|
45404
46315
|
return;
|
|
45405
46316
|
this.authenticationError = error;
|
|
45406
46317
|
this.started = false;
|
|
46318
|
+
this.cancelRecoveryRetries();
|
|
45407
46319
|
this.rejectOpen(error);
|
|
45408
46320
|
this.eventStream.close();
|
|
45409
46321
|
try {
|
|
@@ -45413,6 +46325,7 @@ class InlineSdkClient {
|
|
|
45413
46325
|
}
|
|
45414
46326
|
}
|
|
45415
46327
|
async onOpen() {
|
|
46328
|
+
this.cancelRecoveryRetries();
|
|
45416
46329
|
this.requestCatchUpUser();
|
|
45417
46330
|
for (const bucket of this.degradedUpdateBuckets.values()) {
|
|
45418
46331
|
this.requestCatchUpForDegradedBucket(bucket);
|
|
@@ -45463,6 +46376,8 @@ class InlineSdkClient {
|
|
|
45463
46376
|
return this.discoveryInFlight;
|
|
45464
46377
|
if (this.discoveryCommitInFlight)
|
|
45465
46378
|
return this.discoveryCommitInFlight;
|
|
46379
|
+
if (this.discoveryRetry?.timer)
|
|
46380
|
+
return;
|
|
45466
46381
|
const round = {
|
|
45467
46382
|
resultReceived: false,
|
|
45468
46383
|
collectingHints: true,
|
|
@@ -45495,6 +46410,11 @@ class InlineSdkClient {
|
|
|
45495
46410
|
this.log.warn?.("GET_UPDATES_STATE failed (continuing without date cursor)", error);
|
|
45496
46411
|
if (this.discoveryRound === round)
|
|
45497
46412
|
this.discoveryRound = null;
|
|
46413
|
+
if (error instanceof ProtocolClientError && (error.code === "timeout" || error.code === "not-connected" || error.code === "capacity-exceeded" || error.rpcCode === RpcError_Code.INTERNAL_ERROR || error.rpcCode === 500 || error.rpcCode === RpcError_Code.RATE_LIMIT || error.rpcCode === 429)) {
|
|
46414
|
+
this.scheduleDiscoveryRetry(error.rpcCode === RpcError_Code.RATE_LIMIT || error.rpcCode === 429 ? "rate_limited" : "discovery_failed");
|
|
46415
|
+
} else {
|
|
46416
|
+
this.log.error?.("Sync discovery unavailable", { reason: "request_rejected" });
|
|
46417
|
+
}
|
|
45498
46418
|
}
|
|
45499
46419
|
}
|
|
45500
46420
|
tryCommitDiscoveryRound(round) {
|
|
@@ -45519,12 +46439,15 @@ class InlineSdkClient {
|
|
|
45519
46439
|
return;
|
|
45520
46440
|
if (saved) {
|
|
45521
46441
|
this.discoveryRound = null;
|
|
46442
|
+
clearTimeout(this.discoveryRetry?.timer);
|
|
46443
|
+
this.discoveryRetry = null;
|
|
45522
46444
|
return;
|
|
45523
46445
|
}
|
|
45524
46446
|
this.state.dateCursor = previousDateCursor;
|
|
45525
46447
|
this.scheduleStateSave();
|
|
45526
46448
|
this.discoveryRound = null;
|
|
45527
46449
|
this.log.warn?.("Failed to persist discovery checkpoint; preserving previous date cursor");
|
|
46450
|
+
this.scheduleDiscoveryRetry("checkpoint_write_failed");
|
|
45528
46451
|
}).finally(() => {
|
|
45529
46452
|
if (this.discoveryCommitInFlight === commit)
|
|
45530
46453
|
this.discoveryCommitInFlight = null;
|
|
@@ -45859,20 +46782,23 @@ class InlineSdkClient {
|
|
|
45859
46782
|
try {
|
|
45860
46783
|
acknowledged = this.eventStream.send(event);
|
|
45861
46784
|
} catch (error) {
|
|
45862
|
-
const
|
|
45863
|
-
if (
|
|
45864
|
-
this.fenceLiveCursor(
|
|
45865
|
-
this.markUpdateBucketDegraded(
|
|
45866
|
-
this.requestCatchUpAfterEventOverflow(
|
|
46785
|
+
const bucket2 = this.bucketForEvent(event);
|
|
46786
|
+
if (bucket2) {
|
|
46787
|
+
this.fenceLiveCursor(bucket2);
|
|
46788
|
+
this.markUpdateBucketDegraded(bucket2);
|
|
46789
|
+
this.requestCatchUpAfterEventOverflow(bucket2, event);
|
|
45867
46790
|
}
|
|
45868
46791
|
this.log.warn?.("Inbound event buffer overflow; durable cursor remains unchanged and transport will recover", {
|
|
45869
|
-
bucket:
|
|
46792
|
+
bucket: bucket2 ? this.updateBucketKey(bucket2) : "none",
|
|
45870
46793
|
error: extractErrorMessage(error)
|
|
45871
46794
|
});
|
|
45872
46795
|
this.requestRecoveryReconnect("inbound-event-buffer-overflow");
|
|
45873
46796
|
return Promise.resolve(false);
|
|
45874
46797
|
}
|
|
45875
|
-
|
|
46798
|
+
const bucket = source === "live" ? this.sequencedBucketForEvent(event) : undefined;
|
|
46799
|
+
const key = bucket ? this.updateBucketKey(bucket) : undefined;
|
|
46800
|
+
const deliveries = key ? this.liveDeliveriesByBucket.get(key) ?? new Set : undefined;
|
|
46801
|
+
const delivery = acknowledged.then((applied) => {
|
|
45876
46802
|
if (applied) {
|
|
45877
46803
|
onApplied?.();
|
|
45878
46804
|
if (source === "live")
|
|
@@ -45880,8 +46806,16 @@ class InlineSdkClient {
|
|
|
45880
46806
|
} else if (source === "live" && this.started) {
|
|
45881
46807
|
this.recoverLiveEvent(event, "consumer-did-not-apply");
|
|
45882
46808
|
}
|
|
46809
|
+
deliveries?.delete(delivery);
|
|
46810
|
+
if (key && deliveries?.size === 0)
|
|
46811
|
+
this.liveDeliveriesByBucket.delete(key);
|
|
45883
46812
|
return applied;
|
|
45884
46813
|
});
|
|
46814
|
+
if (key && deliveries) {
|
|
46815
|
+
deliveries.add(delivery);
|
|
46816
|
+
this.liveDeliveriesByBucket.set(key, deliveries);
|
|
46817
|
+
}
|
|
46818
|
+
return delivery;
|
|
45885
46819
|
}
|
|
45886
46820
|
bucketForEvent(event) {
|
|
45887
46821
|
switch (event.kind) {
|
|
@@ -46059,20 +46993,25 @@ class InlineSdkClient {
|
|
|
46059
46993
|
}
|
|
46060
46994
|
requestCatchUpForDegradedBucket(bucket) {
|
|
46061
46995
|
switch (bucket.kind) {
|
|
46062
|
-
case "chat":
|
|
46063
|
-
|
|
46064
|
-
|
|
46996
|
+
case "chat": {
|
|
46997
|
+
const request = this.catchUpRequestedByChatId.get(bucket.chatId) ?? this.peerResolutionRequestedByChatId.get(bucket.chatId);
|
|
46998
|
+
const updateSeq = request && !request.toLatest ? request.endSeq : undefined;
|
|
46999
|
+
const peer = bucket.peer ?? this.persistedChatPeer(bucket.chatId);
|
|
47000
|
+
if (peer && this.isReliableChatPeer(peer)) {
|
|
47001
|
+
this.requestCatchUpChat({ chatId: bucket.chatId, peer, updateSeq });
|
|
46065
47002
|
} else {
|
|
46066
|
-
|
|
46067
|
-
if (persistedPeer)
|
|
46068
|
-
this.requestCatchUpChat({ chatId: bucket.chatId, peer: persistedPeer });
|
|
46069
|
-
else
|
|
46070
|
-
this.resolvePersistedChatPeer(bucket.chatId);
|
|
47003
|
+
this.resolvePersistedChatPeer(bucket.chatId, updateSeq);
|
|
46071
47004
|
}
|
|
46072
47005
|
return;
|
|
46073
|
-
|
|
46074
|
-
|
|
47006
|
+
}
|
|
47007
|
+
case "space": {
|
|
47008
|
+
const request = this.catchUpRequestedBySpaceId.get(bucket.spaceId);
|
|
47009
|
+
this.requestCatchUpSpace({
|
|
47010
|
+
spaceId: bucket.spaceId,
|
|
47011
|
+
updateSeq: request && !request.toLatest ? request.endSeq : undefined
|
|
47012
|
+
});
|
|
46075
47013
|
return;
|
|
47014
|
+
}
|
|
46076
47015
|
case "user":
|
|
46077
47016
|
this.requestCatchUpUser(true);
|
|
46078
47017
|
return;
|
|
@@ -46257,7 +47196,7 @@ class InlineSdkClient {
|
|
|
46257
47196
|
bumpChatSeq(chatId, seq, source) {
|
|
46258
47197
|
if (source === "user" || source === "space" || source === "chat")
|
|
46259
47198
|
return;
|
|
46260
|
-
if (source === "live" && this.liveCursorFences.has(`chat:${chatId}`))
|
|
47199
|
+
if (source === "live" && this.liveCursorFences.has(`chat:${chatId}`) && seq !== (this.state.lastSeqByChatId?.[chatId.toString()] ?? 0) + 1)
|
|
46261
47200
|
return;
|
|
46262
47201
|
if (!Number.isFinite(seq))
|
|
46263
47202
|
return;
|
|
@@ -46266,6 +47205,7 @@ class InlineSdkClient {
|
|
|
46266
47205
|
const key = chatId.toString();
|
|
46267
47206
|
const prev = this.state.lastSeqByChatId[key] ?? 0;
|
|
46268
47207
|
if (seq > prev) {
|
|
47208
|
+
this.resetRecoveryBackoff({ kind: "chat", chatId });
|
|
46269
47209
|
this.state.lastSeqByChatId[key] = seq;
|
|
46270
47210
|
this.scheduleStateSave();
|
|
46271
47211
|
}
|
|
@@ -46274,7 +47214,7 @@ class InlineSdkClient {
|
|
|
46274
47214
|
bumpSpaceSeq(spaceId, seq, source) {
|
|
46275
47215
|
if (source === "user" || source === "space" || source === "chat")
|
|
46276
47216
|
return;
|
|
46277
|
-
if (source === "live" && this.liveCursorFences.has(`space:${spaceId}`))
|
|
47217
|
+
if (source === "live" && this.liveCursorFences.has(`space:${spaceId}`) && seq !== (this.state.lastSeqBySpaceId?.[spaceId.toString()] ?? 0) + 1)
|
|
46278
47218
|
return;
|
|
46279
47219
|
if (!Number.isFinite(seq))
|
|
46280
47220
|
return;
|
|
@@ -46283,6 +47223,7 @@ class InlineSdkClient {
|
|
|
46283
47223
|
const key = spaceId.toString();
|
|
46284
47224
|
const prev = this.state.lastSeqBySpaceId[key] ?? 0;
|
|
46285
47225
|
if (seq > prev) {
|
|
47226
|
+
this.resetRecoveryBackoff({ kind: "space", spaceId });
|
|
46286
47227
|
this.state.lastSeqBySpaceId[key] = seq;
|
|
46287
47228
|
this.scheduleStateSave();
|
|
46288
47229
|
}
|
|
@@ -46297,12 +47238,13 @@ class InlineSdkClient {
|
|
|
46297
47238
|
bumpUserSeq(seq, source) {
|
|
46298
47239
|
if (source === "user" || source === "space" || source === "chat")
|
|
46299
47240
|
return;
|
|
46300
|
-
if (source === "live" && this.liveCursorFences.has("user"))
|
|
47241
|
+
if (source === "live" && this.liveCursorFences.has("user") && seq !== (this.state.lastUserSeq ?? 0) + 1)
|
|
46301
47242
|
return;
|
|
46302
47243
|
if (!Number.isFinite(seq) || seq <= 0)
|
|
46303
47244
|
return;
|
|
46304
47245
|
const prev = this.state.lastUserSeq ?? 0;
|
|
46305
47246
|
if (seq > prev) {
|
|
47247
|
+
this.resetRecoveryBackoff({ kind: "user" });
|
|
46306
47248
|
this.state.lastUserSeq = seq;
|
|
46307
47249
|
this.scheduleStateSave();
|
|
46308
47250
|
}
|
|
@@ -46316,14 +47258,17 @@ class InlineSdkClient {
|
|
|
46316
47258
|
if (this.userCatchUpInFlight) {
|
|
46317
47259
|
return this.userCatchUpInFlight;
|
|
46318
47260
|
}
|
|
47261
|
+
if (this.recoveryRetries.get("user")?.timer)
|
|
47262
|
+
return null;
|
|
46319
47263
|
this.fenceLiveCursor({ kind: "user" });
|
|
46320
47264
|
this.userCatchUpInFlight = this.doCatchUpUser(lastUserSeq ?? 0).catch((error) => {
|
|
46321
|
-
this.
|
|
47265
|
+
this.recordCatchUpFailure({ kind: "user" }, error);
|
|
46322
47266
|
this.log.warn?.("GET_UPDATES user catch-up failed; bucket remains degraded", {
|
|
46323
47267
|
error: extractErrorMessage(error)
|
|
46324
47268
|
});
|
|
46325
47269
|
}).finally(() => {
|
|
46326
47270
|
this.userCatchUpInFlight = null;
|
|
47271
|
+
this.scheduleRecoveryRetry({ kind: "user" });
|
|
46327
47272
|
});
|
|
46328
47273
|
return this.userCatchUpInFlight;
|
|
46329
47274
|
}
|
|
@@ -46376,7 +47321,7 @@ class InlineSdkClient {
|
|
|
46376
47321
|
});
|
|
46377
47322
|
}
|
|
46378
47323
|
if (deliveredSeq <= cursor && !payload.final) {
|
|
46379
|
-
this.markUpdateBucketDegraded({ kind: "user" });
|
|
47324
|
+
this.markUpdateBucketDegraded({ kind: "user" }, "non_progress");
|
|
46380
47325
|
this.log.warn?.("GET_UPDATES user catch-up made no progress; bucket remains degraded", {
|
|
46381
47326
|
cursor,
|
|
46382
47327
|
deliveredSeq
|
|
@@ -46412,15 +47357,18 @@ class InlineSdkClient {
|
|
|
46412
47357
|
const existing = this.catchUpInFlightByChatId.get(params.chatId);
|
|
46413
47358
|
if (existing)
|
|
46414
47359
|
return existing;
|
|
47360
|
+
if (this.recoveryRetries.get(`chat:${params.chatId}`)?.timer)
|
|
47361
|
+
return Promise.resolve();
|
|
47362
|
+
const initialDemand = this.catchUpRequestedByChatId.get(params.chatId);
|
|
46415
47363
|
const task = this.drainCatchUpChat(params.chatId).catch((error) => {
|
|
46416
|
-
this.catchUpRequestedByChatId.
|
|
46417
|
-
this.markUpdateBucketDegraded({ kind: "chat", chatId: params.chatId, peer: params.peer });
|
|
47364
|
+
this.recordCatchUpFailure({ kind: "chat", chatId: params.chatId, peer: params.peer }, error, this.catchUpRequestedByChatId.get(params.chatId) !== initialDemand);
|
|
46418
47365
|
this.log.warn?.("GET_UPDATES chat catch-up failed; bucket remains degraded", {
|
|
46419
47366
|
chatId: params.chatId.toString(),
|
|
46420
47367
|
error: extractErrorMessage(error)
|
|
46421
47368
|
});
|
|
46422
47369
|
}).finally(() => {
|
|
46423
47370
|
this.catchUpInFlightByChatId.delete(params.chatId);
|
|
47371
|
+
this.scheduleRecoveryRetry({ kind: "chat", chatId: params.chatId });
|
|
46424
47372
|
});
|
|
46425
47373
|
this.catchUpInFlightByChatId.set(params.chatId, task);
|
|
46426
47374
|
return task;
|
|
@@ -46444,12 +47392,8 @@ class InlineSdkClient {
|
|
|
46444
47392
|
if (stop) {
|
|
46445
47393
|
if (this.catchUpRequestedByChatId.get(chatId) !== request)
|
|
46446
47394
|
continue;
|
|
46447
|
-
this.
|
|
46448
|
-
|
|
46449
|
-
}
|
|
46450
|
-
const latest = this.catchUpRequestedByChatId.get(chatId);
|
|
46451
|
-
const syncedSeq = this.state.lastSeqByChatId?.[key] ?? 0;
|
|
46452
|
-
if (!latest || latest.endSeq != null && latest.endSeq <= syncedSeq) {
|
|
47395
|
+
if (this.degradedUpdateBuckets.has(`chat:${chatId}`))
|
|
47396
|
+
return;
|
|
46453
47397
|
this.catchUpRequestedByChatId.delete(chatId);
|
|
46454
47398
|
return;
|
|
46455
47399
|
}
|
|
@@ -46516,7 +47460,7 @@ class InlineSdkClient {
|
|
|
46516
47460
|
});
|
|
46517
47461
|
}
|
|
46518
47462
|
if (deliveredSeq <= cursor && !payload.final) {
|
|
46519
|
-
this.markUpdateBucketDegraded({ kind: "chat", chatId, peer });
|
|
47463
|
+
this.markUpdateBucketDegraded({ kind: "chat", chatId, peer }, "non_progress");
|
|
46520
47464
|
this.log.warn?.("GET_UPDATES made no progress; bucket remains degraded", {
|
|
46521
47465
|
chatId: chatId.toString(),
|
|
46522
47466
|
cursor,
|
|
@@ -46534,7 +47478,7 @@ class InlineSdkClient {
|
|
|
46534
47478
|
continue;
|
|
46535
47479
|
}
|
|
46536
47480
|
if (endSeq != null && deliveredSeq < endSeq) {
|
|
46537
|
-
this.markUpdateBucketDegraded({ kind: "chat", chatId, peer });
|
|
47481
|
+
this.markUpdateBucketDegraded({ kind: "chat", chatId, peer }, "target_not_reached");
|
|
46538
47482
|
this.log.warn?.("GET_UPDATES final chat page remained behind the requested target", {
|
|
46539
47483
|
chatId: chatId.toString(),
|
|
46540
47484
|
requestedEndSeq: endSeq,
|
|
@@ -46560,15 +47504,18 @@ class InlineSdkClient {
|
|
|
46560
47504
|
const existing = this.catchUpInFlightBySpaceId.get(params.spaceId);
|
|
46561
47505
|
if (existing)
|
|
46562
47506
|
return existing;
|
|
47507
|
+
if (this.recoveryRetries.get(`space:${params.spaceId}`)?.timer)
|
|
47508
|
+
return Promise.resolve();
|
|
47509
|
+
const initialDemand = this.catchUpRequestedBySpaceId.get(params.spaceId);
|
|
46563
47510
|
const task = this.drainCatchUpSpace(params.spaceId).catch((error) => {
|
|
46564
|
-
this.catchUpRequestedBySpaceId.
|
|
46565
|
-
this.markUpdateBucketDegraded({ kind: "space", spaceId: params.spaceId });
|
|
47511
|
+
this.recordCatchUpFailure({ kind: "space", spaceId: params.spaceId }, error, this.catchUpRequestedBySpaceId.get(params.spaceId) !== initialDemand);
|
|
46566
47512
|
this.log.warn?.("GET_UPDATES space catch-up failed; bucket remains degraded", {
|
|
46567
47513
|
spaceId: params.spaceId.toString(),
|
|
46568
47514
|
error: extractErrorMessage(error)
|
|
46569
47515
|
});
|
|
46570
47516
|
}).finally(() => {
|
|
46571
47517
|
this.catchUpInFlightBySpaceId.delete(params.spaceId);
|
|
47518
|
+
this.scheduleRecoveryRetry({ kind: "space", spaceId: params.spaceId });
|
|
46572
47519
|
});
|
|
46573
47520
|
this.catchUpInFlightBySpaceId.set(params.spaceId, task);
|
|
46574
47521
|
return task;
|
|
@@ -46592,12 +47539,8 @@ class InlineSdkClient {
|
|
|
46592
47539
|
if (stop) {
|
|
46593
47540
|
if (this.catchUpRequestedBySpaceId.get(spaceId) !== request)
|
|
46594
47541
|
continue;
|
|
46595
|
-
this.
|
|
46596
|
-
|
|
46597
|
-
}
|
|
46598
|
-
const latest = this.catchUpRequestedBySpaceId.get(spaceId);
|
|
46599
|
-
const syncedSeq = this.state.lastSeqBySpaceId?.[key] ?? 0;
|
|
46600
|
-
if (!latest || latest.endSeq != null && latest.endSeq <= syncedSeq) {
|
|
47542
|
+
if (this.degradedUpdateBuckets.has(`space:${spaceId}`))
|
|
47543
|
+
return;
|
|
46601
47544
|
this.catchUpRequestedBySpaceId.delete(spaceId);
|
|
46602
47545
|
return;
|
|
46603
47546
|
}
|
|
@@ -46666,7 +47609,7 @@ class InlineSdkClient {
|
|
|
46666
47609
|
});
|
|
46667
47610
|
}
|
|
46668
47611
|
if (deliveredSeq <= cursor && !payload.final) {
|
|
46669
|
-
this.markUpdateBucketDegraded({ kind: "space", spaceId });
|
|
47612
|
+
this.markUpdateBucketDegraded({ kind: "space", spaceId }, "non_progress");
|
|
46670
47613
|
this.log.warn?.("GET_UPDATES space made no progress; bucket remains degraded", {
|
|
46671
47614
|
spaceId: spaceId.toString(),
|
|
46672
47615
|
cursor,
|
|
@@ -46684,7 +47627,7 @@ class InlineSdkClient {
|
|
|
46684
47627
|
continue;
|
|
46685
47628
|
}
|
|
46686
47629
|
if (endSeq != null && deliveredSeq < endSeq) {
|
|
46687
|
-
this.markUpdateBucketDegraded({ kind: "space", spaceId });
|
|
47630
|
+
this.markUpdateBucketDegraded({ kind: "space", spaceId }, "target_not_reached");
|
|
46688
47631
|
this.log.warn?.("GET_UPDATES final space page remained behind the requested target", {
|
|
46689
47632
|
spaceId: spaceId.toString(),
|
|
46690
47633
|
requestedEndSeq: endSeq,
|
|
@@ -46709,6 +47652,9 @@ class InlineSdkClient {
|
|
|
46709
47652
|
const existing = this.peerResolutionInFlightByChatId.get(chatId);
|
|
46710
47653
|
if (existing)
|
|
46711
47654
|
return existing;
|
|
47655
|
+
if (this.recoveryRetries.get(`chat:${chatId}`)?.timer)
|
|
47656
|
+
return Promise.resolve();
|
|
47657
|
+
const initialDemand = this.peerResolutionRequestedByChatId.get(chatId);
|
|
46712
47658
|
const task = this.getChat({ chatId }).then(async (chat) => {
|
|
46713
47659
|
const peer = chat.peer;
|
|
46714
47660
|
if (!peer || !this.isReliableChatPeer(peer)) {
|
|
@@ -46722,14 +47668,16 @@ class InlineSdkClient {
|
|
|
46722
47668
|
...requested && !requested.toLatest && requested.endSeq != null ? { updateSeq: requested.endSeq } : {}
|
|
46723
47669
|
});
|
|
46724
47670
|
}).catch((error) => {
|
|
46725
|
-
this.
|
|
47671
|
+
this.recordCatchUpFailure({ kind: "chat", chatId }, error, this.peerResolutionRequestedByChatId.get(chatId) !== initialDemand);
|
|
46726
47672
|
this.log.warn?.("Unable to resolve legacy chat peer; bucket remains degraded", {
|
|
46727
47673
|
chatId: chatId.toString(),
|
|
46728
47674
|
error: extractErrorMessage(error)
|
|
46729
47675
|
});
|
|
46730
47676
|
}).finally(() => {
|
|
46731
47677
|
this.peerResolutionInFlightByChatId.delete(chatId);
|
|
46732
|
-
this.
|
|
47678
|
+
if (!this.degradedUpdateBuckets.has(`chat:${chatId}`))
|
|
47679
|
+
this.peerResolutionRequestedByChatId.delete(chatId);
|
|
47680
|
+
this.scheduleRecoveryRetry({ kind: "chat", chatId });
|
|
46733
47681
|
});
|
|
46734
47682
|
this.peerResolutionInFlightByChatId.set(chatId, task);
|
|
46735
47683
|
return task;
|
|
@@ -46782,7 +47730,7 @@ class InlineSdkClient {
|
|
|
46782
47730
|
}
|
|
46783
47731
|
validateCatchUpPage(payload, startSeq, bucket) {
|
|
46784
47732
|
if (payload.resultType !== GetUpdatesResult_ResultType.SLICE && payload.resultType !== GetUpdatesResult_ResultType.EMPTY) {
|
|
46785
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47733
|
+
this.markUpdateBucketDegraded(bucket, "invalid_page_type");
|
|
46786
47734
|
this.log.warn?.("GET_UPDATES returned an invalid page result type; bucket remains degraded", {
|
|
46787
47735
|
bucket: this.updateBucketKey(bucket),
|
|
46788
47736
|
resultType: payload.resultType
|
|
@@ -46791,7 +47739,7 @@ class InlineSdkClient {
|
|
|
46791
47739
|
}
|
|
46792
47740
|
const deliveredSeq = Number(payload.seq);
|
|
46793
47741
|
if (!Number.isSafeInteger(deliveredSeq) || deliveredSeq < startSeq) {
|
|
46794
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47742
|
+
this.markUpdateBucketDegraded(bucket, "invalid_page_cursor");
|
|
46795
47743
|
this.log.warn?.("GET_UPDATES page moved backwards or returned an invalid seq; bucket remains degraded", {
|
|
46796
47744
|
bucket: this.updateBucketKey(bucket),
|
|
46797
47745
|
startSeq,
|
|
@@ -46803,7 +47751,7 @@ class InlineSdkClient {
|
|
|
46803
47751
|
for (const update of payload.updates) {
|
|
46804
47752
|
const seq = update.seq;
|
|
46805
47753
|
if (!Number.isSafeInteger(seq) || seq == null || seq <= startSeq || seq > deliveredSeq || accounted.has(seq)) {
|
|
46806
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47754
|
+
this.markUpdateBucketDegraded(bucket, "invalid_update_sequence");
|
|
46807
47755
|
this.log.warn?.("GET_UPDATES page included an invalid or duplicate update seq; bucket remains degraded", {
|
|
46808
47756
|
bucket: this.updateBucketKey(bucket),
|
|
46809
47757
|
seq
|
|
@@ -46816,7 +47764,7 @@ class InlineSdkClient {
|
|
|
46816
47764
|
for (const skipped of payload.skippedSequences) {
|
|
46817
47765
|
const seq = Number(skipped.seq);
|
|
46818
47766
|
if (!Number.isSafeInteger(seq) || seq <= startSeq || seq > deliveredSeq || accounted.has(seq)) {
|
|
46819
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47767
|
+
this.markUpdateBucketDegraded(bucket, "invalid_skipped_sequence");
|
|
46820
47768
|
this.log.warn?.("GET_UPDATES page included an invalid or duplicate skipped seq; bucket remains degraded", {
|
|
46821
47769
|
bucket: this.updateBucketKey(bucket),
|
|
46822
47770
|
seq
|
|
@@ -46832,7 +47780,7 @@ class InlineSdkClient {
|
|
|
46832
47780
|
break;
|
|
46833
47781
|
case SyncSkippedSequence_Reason.REASON_UNSPECIFIED:
|
|
46834
47782
|
default:
|
|
46835
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47783
|
+
this.markUpdateBucketDegraded(bucket, "unknown_skip_reason");
|
|
46836
47784
|
this.log.warn?.("GET_UPDATES page included an unsupported skipped-sequence reason; bucket remains degraded", {
|
|
46837
47785
|
bucket: this.updateBucketKey(bucket),
|
|
46838
47786
|
reason: skipped.reason
|
|
@@ -46841,7 +47789,7 @@ class InlineSdkClient {
|
|
|
46841
47789
|
}
|
|
46842
47790
|
}
|
|
46843
47791
|
if (accounted.size !== deliveredSeq - startSeq) {
|
|
46844
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47792
|
+
this.markUpdateBucketDegraded(bucket, "unaccounted_gap");
|
|
46845
47793
|
this.log.warn?.("GET_UPDATES page did not account for every advanced sequence; bucket remains degraded", {
|
|
46846
47794
|
bucket: this.updateBucketKey(bucket),
|
|
46847
47795
|
startSeq,
|
|
@@ -46923,7 +47871,7 @@ class InlineSdkClient {
|
|
|
46923
47871
|
this.clearUpdateBucketDegraded(bucket);
|
|
46924
47872
|
return true;
|
|
46925
47873
|
} catch (error) {
|
|
46926
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47874
|
+
this.markUpdateBucketDegraded(bucket, "repair_failed");
|
|
46927
47875
|
this.log.warn?.("Authoritative update repair failed; bucket remains degraded", {
|
|
46928
47876
|
bucket: this.updateBucketKey(bucket),
|
|
46929
47877
|
error: extractErrorMessage(error)
|
|
@@ -46932,7 +47880,17 @@ class InlineSdkClient {
|
|
|
46932
47880
|
}
|
|
46933
47881
|
}
|
|
46934
47882
|
async acceptCatchUpUpdates(updates, source, bucket) {
|
|
47883
|
+
const liveDeliveries = this.liveDeliveriesByBucket.get(this.updateBucketKey(bucket));
|
|
47884
|
+
if (liveDeliveries && (await Promise.all(liveDeliveries)).some((applied) => !applied)) {
|
|
47885
|
+
this.markUpdateBucketDegraded(bucket, "host_unacknowledged");
|
|
47886
|
+
return false;
|
|
47887
|
+
}
|
|
47888
|
+
if (this.closed)
|
|
47889
|
+
return false;
|
|
47890
|
+
const appliedThrough = this.bucketCursor(bucket);
|
|
46935
47891
|
for (const update of updates) {
|
|
47892
|
+
if (update.seq != null && update.seq > 0 && update.seq <= appliedThrough)
|
|
47893
|
+
continue;
|
|
46936
47894
|
if (update.update.oneofKind === "chatSkipPts" && source === "chat") {
|
|
46937
47895
|
continue;
|
|
46938
47896
|
}
|
|
@@ -46943,7 +47901,7 @@ class InlineSdkClient {
|
|
|
46943
47901
|
if (accepted === true)
|
|
46944
47902
|
continue;
|
|
46945
47903
|
if (accepted === false) {
|
|
46946
|
-
this.markUpdateBucketDegraded(bucket);
|
|
47904
|
+
this.markUpdateBucketDegraded(bucket, "host_unacknowledged");
|
|
46947
47905
|
this.log.warn?.("GET_UPDATES event was not acknowledged by the SDK host; cursor remains unchanged", {
|
|
46948
47906
|
bucket: this.updateBucketKey(bucket),
|
|
46949
47907
|
updateKind: update.update.oneofKind
|
|
@@ -46964,8 +47922,95 @@ class InlineSdkClient {
|
|
|
46964
47922
|
}
|
|
46965
47923
|
return true;
|
|
46966
47924
|
}
|
|
46967
|
-
|
|
46968
|
-
|
|
47925
|
+
recordCatchUpFailure(bucket, error, hasNewerDemand = false) {
|
|
47926
|
+
const rpcCode = error instanceof ProtocolClientError ? error.rpcCode : undefined;
|
|
47927
|
+
if (!hasNewerDemand && bucket.kind !== "user" && (rpcCode === RpcError_Code.PEER_ID_INVALID || rpcCode === RpcError_Code.CHAT_ID_INVALID || rpcCode === RpcError_Code.SPACE_ID_INVALID)) {
|
|
47928
|
+
this.clearUpdateBucketDegraded(bucket);
|
|
47929
|
+
if (bucket.kind === "chat") {
|
|
47930
|
+
this.catchUpRequestedByChatId.delete(bucket.chatId);
|
|
47931
|
+
this.peerResolutionRequestedByChatId.delete(bucket.chatId);
|
|
47932
|
+
} else
|
|
47933
|
+
this.catchUpRequestedBySpaceId.delete(bucket.spaceId);
|
|
47934
|
+
const round = this.discoveryRound;
|
|
47935
|
+
if (round) {
|
|
47936
|
+
round.targets.delete(this.updateBucketKey(bucket));
|
|
47937
|
+
this.tryCommitDiscoveryRound(round);
|
|
47938
|
+
}
|
|
47939
|
+
this.log.error?.("Sync bucket unavailable", { bucketKind: bucket.kind, reason: "access_rejected" });
|
|
47940
|
+
return;
|
|
47941
|
+
}
|
|
47942
|
+
this.markUpdateBucketDegraded(bucket, rpcCode === RpcError_Code.RATE_LIMIT || rpcCode === 429 ? "rate_limited" : error instanceof ProtocolClientError ? error.code : "request_failed");
|
|
47943
|
+
}
|
|
47944
|
+
markUpdateBucketDegraded(bucket, failure = "incomplete") {
|
|
47945
|
+
const key = this.updateBucketKey(bucket);
|
|
47946
|
+
this.degradedUpdateBuckets.set(key, bucket);
|
|
47947
|
+
const retry = this.recoveryRetries.get(key) ?? { attempt: 0, failure, reported: new Set };
|
|
47948
|
+
retry.failure = failure;
|
|
47949
|
+
this.recoveryRetries.set(key, retry);
|
|
47950
|
+
queueMicrotask(() => this.scheduleRecoveryRetry(bucket));
|
|
47951
|
+
}
|
|
47952
|
+
resetRecoveryBackoff(bucket) {
|
|
47953
|
+
const retry = this.recoveryRetries.get(this.updateBucketKey(bucket));
|
|
47954
|
+
if (retry)
|
|
47955
|
+
retry.attempt = 0;
|
|
47956
|
+
}
|
|
47957
|
+
cancelRecoveryRetries() {
|
|
47958
|
+
clearTimeout(this.discoveryRetry?.timer);
|
|
47959
|
+
this.discoveryRetry = null;
|
|
47960
|
+
for (const retry of this.recoveryRetries.values())
|
|
47961
|
+
clearTimeout(retry.timer);
|
|
47962
|
+
this.recoveryRetries.clear();
|
|
47963
|
+
}
|
|
47964
|
+
scheduleDiscoveryRetry(reason) {
|
|
47965
|
+
if (!this.started || this.closed || this.protocol.getDiagnostics().state !== "open")
|
|
47966
|
+
return;
|
|
47967
|
+
const retry = this.discoveryRetry ?? { attempt: 0, reported: new Set };
|
|
47968
|
+
if (retry.timer)
|
|
47969
|
+
return;
|
|
47970
|
+
if (!retry.reported.has(reason)) {
|
|
47971
|
+
retry.reported.add(reason);
|
|
47972
|
+
this.log.error?.("Sync recovery scheduled", { bucketKind: "discovery", reason });
|
|
47973
|
+
}
|
|
47974
|
+
const delayMs = reason === "rate_limited" ? 60000 : Math.min(30000, 1000 * 2 ** Math.min(retry.attempt, 5));
|
|
47975
|
+
retry.attempt++;
|
|
47976
|
+
retry.timer = setTimeout(() => {
|
|
47977
|
+
retry.timer = undefined;
|
|
47978
|
+
if (this.started && !this.closed && this.protocol.getDiagnostics().state === "open") {
|
|
47979
|
+
this.initializeDateCursor();
|
|
47980
|
+
}
|
|
47981
|
+
}, delayMs);
|
|
47982
|
+
retry.timer.unref?.();
|
|
47983
|
+
this.discoveryRetry = retry;
|
|
47984
|
+
}
|
|
47985
|
+
scheduleRecoveryRetry(bucket) {
|
|
47986
|
+
const key = this.updateBucketKey(bucket);
|
|
47987
|
+
if (!this.started || this.closed || !this.degradedUpdateBuckets.has(key))
|
|
47988
|
+
return;
|
|
47989
|
+
if (bucket.kind === "chat" && (this.catchUpInFlightByChatId.has(bucket.chatId) || this.peerResolutionInFlightByChatId.has(bucket.chatId)))
|
|
47990
|
+
return;
|
|
47991
|
+
if (bucket.kind === "space" && this.catchUpInFlightBySpaceId.has(bucket.spaceId))
|
|
47992
|
+
return;
|
|
47993
|
+
if (bucket.kind === "user" && this.userCatchUpInFlight)
|
|
47994
|
+
return;
|
|
47995
|
+
const retry = this.recoveryRetries.get(key) ?? { attempt: 0, failure: "incomplete", reported: new Set };
|
|
47996
|
+
if (retry.timer || this.protocol.getDiagnostics().state !== "open")
|
|
47997
|
+
return;
|
|
47998
|
+
const delayMs = retry.failure === "rate_limited" ? 60000 : Math.min(5000, 1000 * 2 ** Math.min(retry.attempt, 3));
|
|
47999
|
+
if (!retry.reported.has(retry.failure)) {
|
|
48000
|
+
retry.reported.add(retry.failure);
|
|
48001
|
+
this.log.error?.("Sync recovery scheduled", { bucketKind: bucket.kind, reason: retry.failure });
|
|
48002
|
+
}
|
|
48003
|
+
retry.attempt++;
|
|
48004
|
+
retry.timer = setTimeout(() => {
|
|
48005
|
+
retry.timer = undefined;
|
|
48006
|
+
if (!this.started || this.closed || this.protocol.getDiagnostics().state !== "open")
|
|
48007
|
+
return;
|
|
48008
|
+
const pending = this.degradedUpdateBuckets.get(key);
|
|
48009
|
+
if (pending)
|
|
48010
|
+
this.requestCatchUpForDegradedBucket(pending);
|
|
48011
|
+
}, delayMs);
|
|
48012
|
+
retry.timer.unref?.();
|
|
48013
|
+
this.recoveryRetries.set(key, retry);
|
|
46969
48014
|
}
|
|
46970
48015
|
fenceLiveCursor(bucket) {
|
|
46971
48016
|
this.liveCursorFences.add(this.updateBucketKey(bucket));
|
|
@@ -46973,6 +48018,8 @@ class InlineSdkClient {
|
|
|
46973
48018
|
clearUpdateBucketDegraded(bucket) {
|
|
46974
48019
|
const key = this.updateBucketKey(bucket);
|
|
46975
48020
|
this.degradedUpdateBuckets.delete(key);
|
|
48021
|
+
clearTimeout(this.recoveryRetries.get(key)?.timer);
|
|
48022
|
+
this.recoveryRetries.delete(key);
|
|
46976
48023
|
this.liveCursorFences.delete(key);
|
|
46977
48024
|
this.liveAdmittedSeqByBucket.delete(key);
|
|
46978
48025
|
}
|
|
@@ -63830,6 +64877,12 @@ var INLINE_MESSAGE_ENTITY_TYPE = {
|
|
|
63830
64877
|
function compactWhitespace(raw) {
|
|
63831
64878
|
return (raw ?? "").replace(/\s+/g, " ").trim();
|
|
63832
64879
|
}
|
|
64880
|
+
function normalizeRawMessageText(raw) {
|
|
64881
|
+
return (raw ?? "").replaceAll(`\r
|
|
64882
|
+
`, `
|
|
64883
|
+
`).replaceAll("\r", `
|
|
64884
|
+
`).trim();
|
|
64885
|
+
}
|
|
63833
64886
|
function bestPhotoSize(photo) {
|
|
63834
64887
|
let best = {
|
|
63835
64888
|
cdnUrl: null,
|
|
@@ -64134,7 +65187,7 @@ function formatEntitySummary(entity) {
|
|
|
64134
65187
|
}
|
|
64135
65188
|
}
|
|
64136
65189
|
function summarizeInlineMessageContent(message) {
|
|
64137
|
-
const rawText =
|
|
65190
|
+
const rawText = normalizeRawMessageText(message.message);
|
|
64138
65191
|
const media = messageMediaSummary(message);
|
|
64139
65192
|
const attachments = messageAttachmentSummaries(message);
|
|
64140
65193
|
const entities = messageEntitySummaries(message);
|
|
@@ -66865,5 +67918,5 @@ export {
|
|
|
66865
67918
|
registerInlinePluginFull
|
|
66866
67919
|
};
|
|
66867
67920
|
|
|
66868
|
-
//# debugId=
|
|
67921
|
+
//# debugId=1DD482459CA9FC1164756E2164756E21
|
|
66869
67922
|
//# sourceMappingURL=runtime-register-api.js.map
|