@meet-im/meet 3.4.0 → 3.4.1

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.
@@ -1,2 +1,2 @@
1
- export declare const MEET_PLUGIN_VERSION = "3.4.0";
1
+ export declare const MEET_PLUGIN_VERSION = "3.4.1";
2
2
  export declare const MEET_OPENCLAW_VERSION = "2026.5.18";
@@ -1,2 +1,2 @@
1
- export const MEET_PLUGIN_VERSION = "3.4.0";
1
+ export const MEET_PLUGIN_VERSION = "3.4.1";
2
2
  export const MEET_OPENCLAW_VERSION = "2026.5.18";
@@ -93,40 +93,42 @@ export async function createMeetReplyDispatcher(opts) {
93
93
  const senderMentionText = shouldAutoMentionSender ? `<@${senderId}>` : undefined;
94
94
  // 创建 typing callbacks(如果配置了 typing 且有必要参数)
95
95
  const hasTypingParams = typingMode && typingMode !== "none" && sessionInfo && apiToken;
96
- let typingRequestChain = Promise.resolve();
97
- const enqueueTypingRequest = (label, run) => {
98
- const next = typingRequestChain.then(async () => {
99
- opts.runtime.log?.(`[${accountId}][${chatId}]: typing ${label} sending...`);
100
- return await run();
101
- });
102
- typingRequestChain = next.then(() => undefined).catch(() => { });
103
- return next;
104
- };
96
+ // stop 请求需要等待最后一个 start 完成,避免乱序
97
+ let lastStartPromise = Promise.resolve();
105
98
  const typingCallbacks = hasTypingParams
106
99
  ? createTypingCallbacks({
107
100
  start: async () => {
108
- const result = await enqueueTypingRequest("start", async () => await sendTypingMeet({
101
+ // 直接发送,不串行化。typing start 是幂等的,重复发送无害
102
+ opts.runtime.log?.(`[${accountId}][${chatId}]: typing start sending...`);
103
+ const startPromise = sendTypingMeet({
109
104
  accountId,
110
105
  chatId,
111
106
  chatType: chatType ?? "channel",
112
107
  sessionInfo,
113
108
  token: apiToken,
114
109
  apiEndpoint,
115
- }));
116
- if (!result.ok && result.reason === "error") {
117
- throw result.error;
118
- }
119
- opts.runtime.log?.(`[${accountId}][${chatId}]: typing start sent ok=${result.ok}`);
110
+ }).then((result) => {
111
+ if (!result.ok && result.reason === "error") {
112
+ throw result.error;
113
+ }
114
+ opts.runtime.log?.(`[${accountId}][${chatId}]: typing start sent ok=${result.ok}`);
115
+ });
116
+ // 记录当前 start 请求,供 stop 等待
117
+ lastStartPromise = startPromise;
118
+ await startPromise;
120
119
  },
121
120
  stop: async () => {
122
- await enqueueTypingRequest("stop", async () => await stopTypingMeet({
121
+ // 等待最后一个 start 完成,避免 stop start 之前到达
122
+ await lastStartPromise;
123
+ opts.runtime.log?.(`[${accountId}][${chatId}]: typing stop sending...`);
124
+ await stopTypingMeet({
123
125
  accountId,
124
126
  chatId,
125
127
  chatType: chatType ?? "channel",
126
128
  sessionInfo,
127
129
  token: apiToken,
128
130
  apiEndpoint,
129
- }));
131
+ });
130
132
  },
131
133
  onStartError: (err) => {
132
134
  opts.runtime.error?.(`[${accountId}][${chatId}]: typing start failed: ${String(err)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meet-im/meet",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "type": "module",
5
5
  "description": "OpenClaw Meet channel plugin",
6
6
  "scripts": {