@inline-openclaw/inline 0.0.43 → 0.0.45

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.
@@ -6967,7 +6967,8 @@ class Chat$Type extends import_runtime4.MessageType {
6967
6967
  { no: 9, name: "date", kind: "scalar", opt: true, T: 3, L: 0 },
6968
6968
  { no: 10, name: "created_by", kind: "scalar", opt: true, T: 3, L: 0 },
6969
6969
  { no: 11, name: "parent_chat_id", kind: "scalar", opt: true, T: 3, L: 0 },
6970
- { no: 12, name: "parent_message_id", kind: "scalar", opt: true, T: 3, L: 0 }
6970
+ { no: 12, name: "parent_message_id", kind: "scalar", opt: true, T: 3, L: 0 },
6971
+ { no: 13, name: "untitled", kind: "scalar", opt: true, T: 8 }
6971
6972
  ]);
6972
6973
  }
6973
6974
  create(value) {
@@ -7019,6 +7020,9 @@ class Chat$Type extends import_runtime4.MessageType {
7019
7020
  case 12:
7020
7021
  message.parentMessageId = reader.int64().toBigInt();
7021
7022
  break;
7023
+ case 13:
7024
+ message.untitled = reader.bool();
7025
+ break;
7022
7026
  default:
7023
7027
  let u = options.readUnknownField;
7024
7028
  if (u === "throw")
@@ -7055,6 +7059,8 @@ class Chat$Type extends import_runtime4.MessageType {
7055
7059
  writer.tag(11, import_runtime.WireType.Varint).int64(message.parentChatId);
7056
7060
  if (message.parentMessageId !== undefined)
7057
7061
  writer.tag(12, import_runtime.WireType.Varint).int64(message.parentMessageId);
7062
+ if (message.untitled !== undefined)
7063
+ writer.tag(13, import_runtime.WireType.Varint).bool(message.untitled);
7058
7064
  let u = options.writeUnknownFields;
7059
7065
  if (u !== false)
7060
7066
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -11164,6 +11170,70 @@ class GetUpdatesInput$Type extends import_runtime4.MessageType {
11164
11170
  }
11165
11171
  var GetUpdatesInput = new GetUpdatesInput$Type;
11166
11172
 
11173
+ class UpdateSidecars$Type extends import_runtime4.MessageType {
11174
+ constructor() {
11175
+ super("UpdateSidecars", [
11176
+ { no: 1, name: "users", kind: "message", repeat: 1, T: () => User },
11177
+ { no: 2, name: "chats", kind: "message", repeat: 1, T: () => Chat },
11178
+ { no: 3, name: "dialogs", kind: "message", repeat: 1, T: () => Dialog },
11179
+ { no: 4, name: "spaces", kind: "message", repeat: 1, T: () => Space }
11180
+ ]);
11181
+ }
11182
+ create(value) {
11183
+ const message = globalThis.Object.create(this.messagePrototype);
11184
+ message.users = [];
11185
+ message.chats = [];
11186
+ message.dialogs = [];
11187
+ message.spaces = [];
11188
+ if (value !== undefined)
11189
+ import_runtime3.reflectionMergePartial(this, message, value);
11190
+ return message;
11191
+ }
11192
+ internalBinaryRead(reader, length, options, target) {
11193
+ let message = target ?? this.create(), end = reader.pos + length;
11194
+ while (reader.pos < end) {
11195
+ let [fieldNo, wireType] = reader.tag();
11196
+ switch (fieldNo) {
11197
+ case 1:
11198
+ message.users.push(User.internalBinaryRead(reader, reader.uint32(), options));
11199
+ break;
11200
+ case 2:
11201
+ message.chats.push(Chat.internalBinaryRead(reader, reader.uint32(), options));
11202
+ break;
11203
+ case 3:
11204
+ message.dialogs.push(Dialog.internalBinaryRead(reader, reader.uint32(), options));
11205
+ break;
11206
+ case 4:
11207
+ message.spaces.push(Space.internalBinaryRead(reader, reader.uint32(), options));
11208
+ break;
11209
+ default:
11210
+ let u = options.readUnknownField;
11211
+ if (u === "throw")
11212
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
11213
+ let d = reader.skip(wireType);
11214
+ if (u !== false)
11215
+ (u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
11216
+ }
11217
+ }
11218
+ return message;
11219
+ }
11220
+ internalBinaryWrite(message, writer, options) {
11221
+ for (let i = 0;i < message.users.length; i++)
11222
+ User.internalBinaryWrite(message.users[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
11223
+ for (let i = 0;i < message.chats.length; i++)
11224
+ Chat.internalBinaryWrite(message.chats[i], writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
11225
+ for (let i = 0;i < message.dialogs.length; i++)
11226
+ Dialog.internalBinaryWrite(message.dialogs[i], writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
11227
+ for (let i = 0;i < message.spaces.length; i++)
11228
+ Space.internalBinaryWrite(message.spaces[i], writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
11229
+ let u = options.writeUnknownFields;
11230
+ if (u !== false)
11231
+ (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
11232
+ return writer;
11233
+ }
11234
+ }
11235
+ var UpdateSidecars = new UpdateSidecars$Type;
11236
+
11167
11237
  class GetUpdatesResult$Type extends import_runtime4.MessageType {
11168
11238
  constructor() {
11169
11239
  super("GetUpdatesResult", [
@@ -11171,7 +11241,8 @@ class GetUpdatesResult$Type extends import_runtime4.MessageType {
11171
11241
  { no: 2, name: "seq", kind: "scalar", T: 3, L: 0 },
11172
11242
  { no: 3, name: "date", kind: "scalar", T: 3, L: 0 },
11173
11243
  { no: 4, name: "final", kind: "scalar", opt: true, T: 8 },
11174
- { no: 5, name: "result_type", kind: "enum", T: () => ["GetUpdatesResult.ResultType", GetUpdatesResult_ResultType, "RESULT_TYPE_"] }
11244
+ { no: 5, name: "result_type", kind: "enum", T: () => ["GetUpdatesResult.ResultType", GetUpdatesResult_ResultType, "RESULT_TYPE_"] },
11245
+ { no: 6, name: "sidecars", kind: "message", T: () => UpdateSidecars }
11175
11246
  ]);
11176
11247
  }
11177
11248
  create(value) {
@@ -11204,6 +11275,9 @@ class GetUpdatesResult$Type extends import_runtime4.MessageType {
11204
11275
  case 5:
11205
11276
  message.resultType = reader.int32();
11206
11277
  break;
11278
+ case 6:
11279
+ message.sidecars = UpdateSidecars.internalBinaryRead(reader, reader.uint32(), options, message.sidecars);
11280
+ break;
11207
11281
  default:
11208
11282
  let u = options.readUnknownField;
11209
11283
  if (u === "throw")
@@ -11226,6 +11300,8 @@ class GetUpdatesResult$Type extends import_runtime4.MessageType {
11226
11300
  writer.tag(4, import_runtime.WireType.Varint).bool(message.final);
11227
11301
  if (message.resultType !== 0)
11228
11302
  writer.tag(5, import_runtime.WireType.Varint).int32(message.resultType);
11303
+ if (message.sidecars)
11304
+ UpdateSidecars.internalBinaryWrite(message.sidecars, writer.tag(6, import_runtime.WireType.LengthDelimited).fork(), options).join();
11229
11305
  let u = options.writeUnknownFields;
11230
11306
  if (u !== false)
11231
11307
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -15952,7 +16028,7 @@ var ReserveChatIdsResult = new ReserveChatIdsResult$Type;
15952
16028
  class CreateChatInput$Type extends import_runtime4.MessageType {
15953
16029
  constructor() {
15954
16030
  super("CreateChatInput", [
15955
- { no: 1, name: "title", kind: "scalar", T: 9 },
16031
+ { no: 1, name: "title", kind: "scalar", opt: true, T: 9 },
15956
16032
  { no: 2, name: "space_id", kind: "scalar", opt: true, T: 3, L: 0 },
15957
16033
  { no: 3, name: "description", kind: "scalar", opt: true, T: 9 },
15958
16034
  { no: 4, name: "emoji", kind: "scalar", opt: true, T: 9 },
@@ -15963,7 +16039,6 @@ class CreateChatInput$Type extends import_runtime4.MessageType {
15963
16039
  }
15964
16040
  create(value) {
15965
16041
  const message = globalThis.Object.create(this.messagePrototype);
15966
- message.title = "";
15967
16042
  message.isPublic = false;
15968
16043
  message.participants = [];
15969
16044
  if (value !== undefined)
@@ -16008,7 +16083,7 @@ class CreateChatInput$Type extends import_runtime4.MessageType {
16008
16083
  return message;
16009
16084
  }
16010
16085
  internalBinaryWrite(message, writer, options) {
16011
- if (message.title !== "")
16086
+ if (message.title !== undefined)
16012
16087
  writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.title);
16013
16088
  if (message.spaceId !== undefined)
16014
16089
  writer.tag(2, import_runtime.WireType.Varint).int64(message.spaceId);
@@ -16858,7 +16933,8 @@ class UpdateChatInfo$Type extends import_runtime4.MessageType {
16858
16933
  super("UpdateChatInfo", [
16859
16934
  { no: 1, name: "chat_id", kind: "scalar", T: 3, L: 0 },
16860
16935
  { no: 2, name: "title", kind: "scalar", opt: true, T: 9 },
16861
- { no: 3, name: "emoji", kind: "scalar", opt: true, T: 9 }
16936
+ { no: 3, name: "emoji", kind: "scalar", opt: true, T: 9 },
16937
+ { no: 4, name: "untitled", kind: "scalar", opt: true, T: 8 }
16862
16938
  ]);
16863
16939
  }
16864
16940
  create(value) {
@@ -16882,6 +16958,9 @@ class UpdateChatInfo$Type extends import_runtime4.MessageType {
16882
16958
  case 3:
16883
16959
  message.emoji = reader.string();
16884
16960
  break;
16961
+ case 4:
16962
+ message.untitled = reader.bool();
16963
+ break;
16885
16964
  default:
16886
16965
  let u = options.readUnknownField;
16887
16966
  if (u === "throw")
@@ -16900,6 +16979,8 @@ class UpdateChatInfo$Type extends import_runtime4.MessageType {
16900
16979
  writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.title);
16901
16980
  if (message.emoji !== undefined)
16902
16981
  writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.emoji);
16982
+ if (message.untitled !== undefined)
16983
+ writer.tag(4, import_runtime.WireType.Varint).bool(message.untitled);
16903
16984
  let u = options.writeUnknownFields;
16904
16985
  if (u !== false)
16905
16986
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -20965,7 +21046,7 @@ class InlineSdkClient {
20965
21046
  await this.handleUpdate(update);
20966
21047
  }
20967
21048
  }
20968
- async handleUpdate(update) {
21049
+ async handleUpdate(update, options) {
20969
21050
  const seq = update.seq ?? 0;
20970
21051
  const date = update.date ?? 0n;
20971
21052
  switch (update.update.oneofKind) {
@@ -21097,6 +21178,34 @@ class InlineSdkClient {
21097
21178
  });
21098
21179
  return;
21099
21180
  }
21181
+ case "participantAdd": {
21182
+ const payload = update.update.participantAdd;
21183
+ if (options?.source !== "user" && options?.source !== "space") {
21184
+ this.bumpChatSeq(payload.chatId, seq);
21185
+ }
21186
+ await this.eventStream.send({
21187
+ kind: "chat.participant.add",
21188
+ chatId: payload.chatId,
21189
+ ...payload.participant ? { participant: payload.participant } : {},
21190
+ seq,
21191
+ date
21192
+ });
21193
+ return;
21194
+ }
21195
+ case "participantDelete": {
21196
+ const payload = update.update.participantDelete;
21197
+ if (options?.source !== "user" && options?.source !== "space") {
21198
+ this.bumpChatSeq(payload.chatId, seq);
21199
+ }
21200
+ await this.eventStream.send({
21201
+ kind: "chat.participant.delete",
21202
+ chatId: payload.chatId,
21203
+ userId: payload.userId,
21204
+ seq,
21205
+ date
21206
+ });
21207
+ return;
21208
+ }
21100
21209
  case "messageActionInvoked": {
21101
21210
  const payload = update.update.messageActionInvoked;
21102
21211
  if (this.shouldSkipUserSeq(seq)) {
@@ -21197,14 +21306,14 @@ class InlineSdkClient {
21197
21306
  }
21198
21307
  }
21199
21308
  requestCatchUpUser() {
21200
- const lastUserSeq = this.state.lastUserSeq ?? 0;
21201
- if (lastUserSeq <= 0) {
21309
+ const lastUserSeq = this.state.lastUserSeq;
21310
+ if (lastUserSeq == null && !this.options.catchUpUserFromStart) {
21202
21311
  return;
21203
21312
  }
21204
21313
  if (this.userCatchUpInFlight) {
21205
21314
  return;
21206
21315
  }
21207
- this.userCatchUpInFlight = this.doCatchUpUser(lastUserSeq).catch((error) => {
21316
+ this.userCatchUpInFlight = this.doCatchUpUser(lastUserSeq ?? 0).catch((error) => {
21208
21317
  this.log.warn?.("GET_UPDATES user catch-up failed; continuing live delivery", {
21209
21318
  error: extractErrorMessage(error)
21210
21319
  });
@@ -21245,7 +21354,7 @@ class InlineSdkClient {
21245
21354
  return;
21246
21355
  }
21247
21356
  for (const update of payload.updates) {
21248
- await this.handleUpdate(update);
21357
+ await this.handleUpdate(update, { source: "user" });
21249
21358
  }
21250
21359
  this.bumpUserSeq(deliveredSeq);
21251
21360
  if (payload.date !== 0n) {
@@ -21344,7 +21453,7 @@ class InlineSdkClient {
21344
21453
  }
21345
21454
  this.bumpChatSeq(chatId, deliveredSeq);
21346
21455
  for (const update of payload.updates) {
21347
- await this.handleUpdate(update);
21456
+ await this.handleUpdate(update, { source: "chat" });
21348
21457
  }
21349
21458
  if (payload.date !== 0n) {
21350
21459
  this.state.dateCursor = payload.date;
@@ -21446,7 +21555,7 @@ class InlineSdkClient {
21446
21555
  }
21447
21556
  this.bumpSpaceSeq(spaceId, deliveredSeq);
21448
21557
  for (const update of payload.updates) {
21449
- await this.handleUpdate(update);
21558
+ await this.handleUpdate(update, { source: "space" });
21450
21559
  }
21451
21560
  if (payload.date !== 0n) {
21452
21561
  this.state.dateCursor = payload.date;
@@ -36388,6 +36497,8 @@ var InlineExecApprovalsSchema = exports_external.object({
36388
36497
  var InlineReactionNotificationsSchema = exports_external.enum(["off", "own", "all", "allowlist"]);
36389
36498
  var InlineStreamingModeSchema = exports_external.enum(["off", "partial", "block", "progress"]);
36390
36499
  var InlineStreamingCommandTextSchema = exports_external.enum(["raw", "status"]);
36500
+ var INLINE_DEFAULT_GROUP_POLICY = "open";
36501
+ var INLINE_DEFAULT_REQUIRE_MENTION = true;
36391
36502
  var InlineStreamingChunkSchema = exports_external.object({
36392
36503
  minChars: exports_external.number().int().positive().optional(),
36393
36504
  maxChars: exports_external.number().int().positive().optional(),
@@ -36459,7 +36570,7 @@ var InlineAccountSchemaBase = exports_external.object({
36459
36570
  defaultTo: InlineTargetSchema.optional(),
36460
36571
  systemPrompt: exports_external.string().optional(),
36461
36572
  groupAllowFrom: exports_external.array(InlineAllowEntrySchema).optional(),
36462
- groupPolicy: GroupPolicySchema.optional().default("allowlist"),
36573
+ groupPolicy: GroupPolicySchema.optional().default(INLINE_DEFAULT_GROUP_POLICY),
36463
36574
  groups: exports_external.record(exports_external.string(), InlineGroupSchema.optional()).optional(),
36464
36575
  requireMention: exports_external.boolean().optional(),
36465
36576
  replyThreadMode: InlineReplyThreadModeSchema.optional(),
@@ -40443,5 +40554,5 @@ export {
40443
40554
  inlineApprovalNativeRuntime
40444
40555
  };
40445
40556
 
40446
- //# debugId=7E42F18FB91A9A3F64756E2164756E21
40557
+ //# debugId=A870EC753942A49D64756E2164756E21
40447
40558
  //# sourceMappingURL=approval-handler.runtime.js.map