@inline-openclaw/inline 0.0.47 → 0.0.49

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.
@@ -12629,7 +12629,8 @@ class UpdateDialogOpenResult$Type extends import_runtime4.MessageType {
12629
12629
  super("UpdateDialogOpenResult", [
12630
12630
  { no: 1, name: "chat", kind: "message", T: () => Chat },
12631
12631
  { no: 2, name: "dialog", kind: "message", T: () => Dialog },
12632
- { no: 3, name: "user", kind: "message", T: () => User }
12632
+ { no: 3, name: "user", kind: "message", T: () => User },
12633
+ { no: 4, name: "deleted_chat", kind: "scalar", opt: true, T: 8 }
12633
12634
  ]);
12634
12635
  }
12635
12636
  create(value) {
@@ -12652,6 +12653,9 @@ class UpdateDialogOpenResult$Type extends import_runtime4.MessageType {
12652
12653
  case 3:
12653
12654
  message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
12654
12655
  break;
12656
+ case 4:
12657
+ message.deletedChat = reader.bool();
12658
+ break;
12655
12659
  default:
12656
12660
  let u = options.readUnknownField;
12657
12661
  if (u === "throw")
@@ -12670,6 +12674,8 @@ class UpdateDialogOpenResult$Type extends import_runtime4.MessageType {
12670
12674
  Dialog.internalBinaryWrite(message.dialog, writer.tag(2, import_runtime.WireType.LengthDelimited).fork(), options).join();
12671
12675
  if (message.user)
12672
12676
  User.internalBinaryWrite(message.user, writer.tag(3, import_runtime.WireType.LengthDelimited).fork(), options).join();
12677
+ if (message.deletedChat !== undefined)
12678
+ writer.tag(4, import_runtime.WireType.Varint).bool(message.deletedChat);
12673
12679
  let u = options.writeUnknownFields;
12674
12680
  if (u !== false)
12675
12681
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -22133,9 +22139,12 @@ function summarizeError(error) {
22133
22139
  }
22134
22140
  function describeConnectionError(error) {
22135
22141
  const value = typeof error === "object" && error !== null ? error : null;
22142
+ const reason = typeof value?.reason === "number" ? value.reason : null;
22143
+ const reasonName = reason == null ? null : ConnectionError_Reason[reason] ?? `UNKNOWN_REASON_${reason}`;
22136
22144
  const code = typeof value?.code === "number" ? value.code : null;
22137
- const message = typeof value?.message === "string" && value.message.trim() ? value.message.trim() : "unknown";
22138
- return `server connection error${code != null ? ` (code=${code})` : ""}: ${message}`;
22145
+ const message = typeof value?.message === "string" && value.message.trim() ? value.message.trim() : reasonName ?? "unknown";
22146
+ const suffix = reasonName != null ? ` (${reasonName})` : code != null ? ` (code=${code})` : "";
22147
+ return `server connection error${suffix}: ${message}`;
22139
22148
  }
22140
22149
 
22141
22150
  // ../../node_modules/.bun/ws@8.21.0/node_modules/ws/wrapper.mjs
@@ -22696,7 +22705,17 @@ class InlineSdkClient {
22696
22705
  const chat = result.getChat.chat;
22697
22706
  if (!chat)
22698
22707
  throw new Error("getChat: missing chat");
22699
- return { chatId: chat.id, peer: chat.peerId, title: chat.title };
22708
+ return {
22709
+ chatId: chat.id,
22710
+ title: chat.title,
22711
+ ...chat.peerId != null ? { peer: chat.peerId } : {},
22712
+ ...chat.spaceId != null ? { spaceId: chat.spaceId } : {},
22713
+ ...chat.parentChatId != null ? { parentChatId: chat.parentChatId } : {},
22714
+ ...chat.parentMessageId != null ? { parentMessageId: chat.parentMessageId } : {},
22715
+ ...chat.isPublic != null ? { isPublic: chat.isPublic } : {},
22716
+ ...chat.untitled != null ? { untitled: chat.untitled } : {},
22717
+ ...chat.number != null ? { number: chat.number } : {}
22718
+ };
22700
22719
  }
22701
22720
  async getMessages(params) {
22702
22721
  const peerId = this.inputPeerFromTarget(params, "getMessages");
@@ -39187,12 +39206,11 @@ import {
39187
39206
  resolveThinkingDefault
39188
39207
  } from "openclaw/plugin-sdk/agent-runtime";
39189
39208
  import {
39190
- applyModelOverrideToSessionEntry,
39191
- loadSessionStore,
39192
- resolveSessionStoreEntry,
39193
- resolveStorePath,
39194
- updateSessionStore
39195
- } from "openclaw/plugin-sdk/config-runtime";
39209
+ getSessionEntry,
39210
+ patchSessionEntry,
39211
+ resolveStorePath
39212
+ } from "openclaw/plugin-sdk/session-store-runtime";
39213
+ import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime";
39196
39214
  import { buildModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime";
39197
39215
  import { listSkillCommandsForAgents as listSkillCommandsForAgents2 } from "openclaw/plugin-sdk/skill-commands-runtime";
39198
39216
  import { getPluginCommandSpecs as getPluginCommandSpecs2 } from "openclaw/plugin-sdk/plugin-runtime";
@@ -39210,9 +39228,9 @@ import {
39210
39228
  import {
39211
39229
  findCodeRegions,
39212
39230
  isInsideCode,
39213
- normalizeLowercaseStringOrEmpty as normalizeLowercaseStringOrEmpty2,
39214
39231
  stripReasoningTagsFromText
39215
- } from "openclaw/plugin-sdk/text-runtime";
39232
+ } from "openclaw/plugin-sdk/text-chunking";
39233
+ import { normalizeLowercaseStringOrEmpty as normalizeLowercaseStringOrEmpty2 } from "openclaw/plugin-sdk/string-coerce-runtime";
39216
39234
 
39217
39235
  // src/sdk-runtime-compat.ts
39218
39236
  var MAX_HISTORY_KEYS = 1000;
@@ -41597,7 +41615,10 @@ function resolveInlineInteractiveButtonsParam(params) {
41597
41615
  return state;
41598
41616
  }
41599
41617
  if (block.type === "select") {
41600
- chunkInteractiveButtons(block.options.map((option) => ({ label: option.label, value: option.value })), state);
41618
+ chunkInteractiveButtons(block.options.map((option) => ({
41619
+ label: option.label,
41620
+ ...option.value !== undefined ? { value: option.value } : {}
41621
+ })), state);
41601
41622
  }
41602
41623
  return state;
41603
41624
  });
@@ -46921,6 +46942,16 @@ function resolveInlineBlockStreamingEnabled(config2) {
46921
46942
  function shouldStartInlineProgressPlaceholderNow(line) {
46922
46943
  return typeof line === "object" && line?.kind === "patch" && Boolean(line.detail);
46923
46944
  }
46945
+ function resolveInlineParentSessionKeyCandidate(sessionKey, entry) {
46946
+ const explicit = normalizeOptionalString3(entry?.parentSessionKey);
46947
+ if (explicit && explicit !== sessionKey)
46948
+ return explicit;
46949
+ const inlineThreadMarker = ":inlineThread:";
46950
+ const markerIndex = sessionKey.lastIndexOf(inlineThreadMarker);
46951
+ if (markerIndex > 0)
46952
+ return sessionKey.slice(0, markerIndex);
46953
+ return;
46954
+ }
46924
46955
  function resolveInlineCommandMenuModelContext(params) {
46925
46956
  if (!params.sessionKey.trim()) {
46926
46957
  return {};
@@ -46931,8 +46962,11 @@ function resolveInlineCommandMenuModelContext(params) {
46931
46962
  cfg: params.cfg,
46932
46963
  agentId: params.agentId
46933
46964
  });
46934
- const store = loadSessionStore(storePath);
46935
- const entry = resolveSessionStoreEntry({ store, sessionKey: params.sessionKey }).existing;
46965
+ const entry = getSessionEntry({
46966
+ agentId: params.agentId,
46967
+ sessionKey: params.sessionKey,
46968
+ storePath
46969
+ });
46936
46970
  const thinkingLevel = normalizeOptionalString3(entry?.thinkingLevel);
46937
46971
  if (entry?.modelOverrideSource === "auto" && normalizeOptionalString3(entry.modelOverride)) {
46938
46972
  return {
@@ -46941,9 +46975,16 @@ function resolveInlineCommandMenuModelContext(params) {
46941
46975
  ...thinkingLevel ? { thinkingLevel } : {}
46942
46976
  };
46943
46977
  }
46978
+ const parentSessionKey = resolveInlineParentSessionKeyCandidate(params.sessionKey, entry);
46979
+ const parentEntry = parentSessionKey ? getSessionEntry({
46980
+ agentId: params.agentId,
46981
+ sessionKey: parentSessionKey,
46982
+ storePath
46983
+ }) : undefined;
46944
46984
  const override = resolveStoredModelOverride({
46945
46985
  ...entry ? { sessionEntry: entry } : {},
46946
- sessionStore: store,
46986
+ ...parentSessionKey ? { parentSessionKey } : {},
46987
+ ...parentSessionKey && parentEntry ? { sessionStore: { [parentSessionKey]: parentEntry } } : {},
46947
46988
  sessionKey: params.sessionKey,
46948
46989
  defaultProvider: defaultModel.provider
46949
46990
  });
@@ -48289,9 +48330,7 @@ async function monitorInlineProvider(params) {
48289
48330
  });
48290
48331
  const eventOptions = {
48291
48332
  sessionKey: ingress.sessionKey,
48292
- contextKey: buildInlineReactionContextKey(params2),
48293
- forceSenderIsOwnerFalse: true,
48294
- trusted: false
48333
+ contextKey: buildInlineReactionContextKey(params2)
48295
48334
  };
48296
48335
  core3.system.enqueueSystemEvent(describeInlineReactionSystemEvent({
48297
48336
  action: params2.action,
@@ -48359,9 +48398,7 @@ async function monitorInlineProvider(params) {
48359
48398
  priorMentionLines
48360
48399
  }), {
48361
48400
  sessionKey: ingress.sessionKey,
48362
- contextKey,
48363
- forceSenderIsOwnerFalse: true,
48364
- trusted: false
48401
+ contextKey
48365
48402
  });
48366
48403
  };
48367
48404
  const shouldQueueInlineReactionSystemEvent = async (params2) => {
@@ -49006,20 +49043,28 @@ Select a provider:`, providerButtons);
49006
49043
  agentId: route.agentId
49007
49044
  });
49008
49045
  const isDefaultSelection = selection.provider === resolvedDefault.provider && selection.model === resolvedDefault.model;
49009
- await updateSessionStore(storePath2, (store) => {
49010
- const entry = store[inboundSessionKey] ?? {
49046
+ await patchSessionEntry({
49047
+ agentId: route.agentId,
49048
+ sessionKey: inboundSessionKey,
49049
+ storePath: storePath2,
49050
+ fallbackEntry: {
49011
49051
  sessionId: inboundSessionKey,
49012
49052
  updatedAt: Date.now()
49013
- };
49014
- store[inboundSessionKey] = entry;
49015
- applyModelOverrideToSessionEntry({
49016
- entry,
49017
- selection: {
49018
- provider: selection.provider,
49019
- model: selection.model,
49020
- isDefault: isDefaultSelection
49021
- }
49022
- });
49053
+ },
49054
+ preserveActivity: true,
49055
+ replaceEntry: true,
49056
+ update: (entry) => {
49057
+ const next = { ...entry };
49058
+ applyModelOverrideToSessionEntry({
49059
+ entry: next,
49060
+ selection: {
49061
+ provider: selection.provider,
49062
+ model: selection.model,
49063
+ isDefault: isDefaultSelection
49064
+ }
49065
+ });
49066
+ return next;
49067
+ }
49023
49068
  });
49024
49069
  const actionText = isDefaultSelection ? "reset to default" : `changed to **${selection.provider}/${selection.model}**`;
49025
49070
  await deliverModelPickerEdit(`✅ Model ${actionText}
@@ -51199,7 +51244,7 @@ function collectInlineStatusIssues(accounts) {
51199
51244
  }
51200
51245
 
51201
51246
  // src/inline/security.ts
51202
- import { resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/config-runtime";
51247
+ import { resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
51203
51248
  import { parseAccessGroupAllowFromEntry } from "openclaw/plugin-sdk/security-runtime";
51204
51249
  function hasEntries2(value) {
51205
51250
  return Array.isArray(value) && value.some((entry) => String(entry).trim());
@@ -53131,5 +53176,5 @@ export {
53131
53176
  inlineChannelPlugin
53132
53177
  };
53133
53178
 
53134
- //# debugId=BE048281D5C3459D64756E2164756E21
53179
+ //# debugId=5CCCED703C8C65BB64756E2164756E21
53135
53180
  //# sourceMappingURL=channel-plugin-api.js.map